views:

56

answers:

2

Hi, any idea why project dependency (Visual Studio) affects linker settings (C++)? I thought that it's enough to chceck linker settings (Additional depend...) or pragma in source code. It's not a big problem, I'm just curious. Thanks.

+1  A: 

If I understand correctly, you are referring to the feature that, when you check project B as dependency of project A, B gets linked into A. This is just for usablility. In that case, Visual Studio knows that it has to check B for changes (and rebuild if necessary) if A gets build. It's really just convenience.

Space_C0wb0y
+1  A: 

If you set your project dependencies correctly then you don't need to add any additional dependencies in the linker tab. What's more, dependencies set correctly ensure that the matching build configuration is linked rather than you having to make sure you set the correct additional directories in the linker.

In general it's best to use the project dependencies to organise your linkage where possible and only add truly 'additional' libraries directly to the linker tab.

Len Holgate