c++ - Project dependencies does not imply linkage in VC++ 2010? -


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 CP-file to the library and a bit in Lib I write a non-negotiable work.
Main (), I'll call ().

The project is set to depend on thelib in the project / dependency.

To my surprise, the solution is not the link: do not get Thefunc () does not link.

In previous versions of Visual Studio, Dependency has automatically linked to theapp, but it seems that this is no longer the case in 2010.

P> Am I doing something wrong?
What is the 'correct' way of getting the desired connection automatically in 2010?

Yes, it is now done differently. They call it "project-to-project dependency". Actually, it is not certain what it means, right-click on the EXE project, properties, common properties, framework and context. Click the Add new reference button and select your .lib project.

"Link library dependency" should be set to True, it is by default. Now you do not need to use the old "project dependency" dialog, it excludes the build order from the new stage.


Comments