I have a newbie question about building a static library in VS 2010 Pro.
When you choose to build a static library (.lib) instead of an application, the Linker option in project properties disappears. Normally I go to Linker->Input->Additional Dependencies to add the needed .lib files for a project.
I’ve built the library and added it to my main application project under Linker->Input->Additional Dependencies. Now when I go to build my main application (with the above static library included in the project .lib files), I am getting a linker error about a method used in the library.
Where do I add the required .lib files when building the static library?
A Static library is linked with your executable. Any dependencies that your static library has (external libraries it requires) must also be specified in your executable.
So, if
libArequireslibB, then an application that links withlibAwill also have to link withlibB.