I really understand but this is not equivalent! I expect both targets to be recompiled if I modify something in the dependent target. Actually, if A is the currently selected target, A depend on B (a library) and I modify a .cpp file of B, none are recompiled except if I manually recompile B. The right way to do it is to depend on all executables/libraries/source files/user dependencies from the dependent target and that's a pain to set.
I don't believe you understand what I 'm saying.
Example:
Project A is a static library.
Project B is an executable that is linked with the static library of project A.
We want B to depend on A, so if anything is changed on A, B is updated.
Do we agree so far?
C::B allows you to set A's product, the static library, as a dependency for B's product, the executable. This is done by going to project B's properties and adding A's library as an external dependency to the B's executable target.
Clear so far?
When you change something in A, say a .cpp file, this makes A dirty so it will be compiled and linked.
When A's static library is linked again, B's executable has dirty external dependency (the relinked A's static library).
Here is the point now: if nothing's changed in B and you try to compile it, it will get re-linked because it depends on a static library which is set as an external dependency.
This is the best I can explain it to you. If you still can't understand it, maybe someone who does and is more fluent with English than me can step in and explain it better.
On another note, it just occured to me you
might be talking about projects build
order inside a workspace. If that's the case, then the only useful hint I can give you is that projects are built top-to-bottom, as seen in the workspace tree. This means if a project A must be compiled before project B, A must be above B in the project tree. Then a "Compile->Compile all projects" will do the trick (i.e. build all in the right order).
You have to excuse me because I have never used any Microsoft IDE, so their terminology eludes me...
HTH,
Yiannis.