Jump to content
  • Advertisement
Sign in to follow this  
chadsxe

Question about linking in a static library with Visual Studios 2008

This topic is 3817 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I am using VC++ 2008. I have two projects under one solution. One project compiles to a static library and the other uses that static library to build an .exe. I used the steps outlined here http://msdn2.microsoft.com/en-us/library/ms235627(VS.80).aspx to perform this. When I build my project in debug it works perfect. But when I build it via "Release" it claims that it can't find a .h that is in the Static Lib project. I did exactly what the link tells me to do but like I said I only am able to build via "Debug" and not "Release". Not sure what I am missing and was hoping someone would have some insight. Regards Chad

Share this post


Link to post
Share on other sites
Advertisement
Check that your "Release" project configuration has the same settings that makes other project to be accessable; VisualStudio changes settings when you switch modes "Debug", "Release", etc.

For example this point could not be set in your project "Release" mode, but only in "Debug" mode:

"To reference the header files of the static library, you must modify the include directories path. To do this, from the Property Pages dialog, expand the Configuration Properties node, then the C/C++ node, and select General. Next to Additional Include Directories, type in the path to the location of the MathFuncsLib.h header file."

* Another option you can do is to set VC++ Include & Lib directories for whole VisualStudio IDE under Tools->Options->Projects & Solutions->VC++ Directories

Share this post


Link to post
Share on other sites
@EvaldsUrtans

You nailed it on the head. I never realized there were two diffrent configurations you could do. I had to follow those steps in release mode. Muhc appreciated.

Regards

Chad

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!