In Microsoft Visual Studio 2010, I use the wizard to create a solution with two projects:
- theapp: a C++ Win32 console app, and
- thelib: a C++ static library
I add an h-file and a cpp-file to the library and write a do-nothing function in thelib.
In main(), I call thefunc().
In project/dependencies theapp is set to depend on thelib.
To my surprise, the solution does not link: the linker does not find thefunc().
In previous versions of Visual Studio, the dependency automagically caused theapp
to be linked with thelib, but it seems it is no longer the case in 2010.
Am I doing something wrong?
What is the 'right' way to automagically achieve the desired linkage in 2010?