Question about linking in a static library with Visual Studios 2008
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
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement