I have two C ++ projects in Visual Studio 2012 (version 11.0.50727.1). Project B depends on project A, through Project Properties> General Properties> Structure and Links .
When I do rebuild on B, the lib for project A is not generated in the output directory, so B fails. Logs show that A is building successfully, but lib just isn't showing up.
The really strange part is that when I do a “clean build” instead of a “rebuild”, everything works correctly. Similarly, Project A builds on its own and creates .lib. Unfortunately, the build system that I have to use will perform a "rebuild", and I would prefer not to change this if possible.
What i tried
I removed the link to the framework and tried to add lib as the linker dependency in B. In this case, A still could not be built, so I ended up with the missing link.
I searched for SO and google for a while, but haven't figured it out yet.
Please let me know if you have ever come across anything like this!
source
share