views:

50

answers:

1

In one Solution, I have two VC++ projects. Project A has linker inputs that are .obj files compiled by project B.

Visual Studio (2008) always tells me that project A is "out of date," and prompts me to ask if I want to rebuild it, every time I want to run/debug/build/etc. Even immediately after building the entire Solution: I do a successful full build, and then click Build again, and it wants to re-link Project A.

How can I prevent this from happening? Anyone understand what's going on here?

+2  A: 

I think that the solution is to stop using .obj files from the other project. Instead, factor the code that is common to both A and B projects into own static library C and link both A and B to it.

wilx
I'd be willing to accept that, if only I could understand **why** using the .obj's doesn't work as expected.
@user406289: Does your solution have a dependency set between A and B? Maybe your are building the projects in bad order?
wilx
Yes, there is a dependency defined in the Solution, and I've also confirmed in the Build Order that B is supposed to build before A.