Reputation: 608
I have two C++ projects in Visual Studio 2012 (Version 11.0.50727.1). Project B depends on project A, via Project Properties > Common Properties > Framework and References.
When I do a rebuild on B, the lib for project A doesn't get generated in the output directory, so B fails. The logs show that A is being built successfully, but the lib simply doesn't show up.
The really strange part is that when I do a 'clean then build' instead of 'rebuild,' everything works correctly. Similarly, project A builds fine on its own and generates a .lib. Unfortunately, the build system I have to use will be doing a 'rebuild,' and I would rather not change that if possible.
What I've Tried
I removed the framework reference and tried to add the lib as a linker dependency in B. In this case, A still failed to build, so I ended up with a missing reference.
I've searched on SO and google for a while, but have come up short so far.
Please let me know if you've ever run into something similar!
Upvotes: 0
Views: 530
Reputation: 608
Looks like the problem was that A and B shared an intermediate directory. Making the two distinct seems to have fixed the issue.
Here's my guess as to what's happening:
This worked in previous version of VS because we did not have parallel building of projects enabled before, so I'm assuming all projects were first cleaned, then built.
Upvotes: 1