I have been using Visual Studio for quite some time now, developing mainly for C++. I was often in need to create solutions, that contained multiple modules (projects) - for example utility library, that was consisted of couple .dll
files.
When there is a need for one module (A) to use another (B), there is standard pattern for this:
- Include required header.
- Link output library file from B (for example, in VS: Project Config ->
Linker
->Input
->Additional Dependencies
->'B.lib'
). - [Optional] Setup proper build order (so B is built before A).
Recently I started to play around with C#, because I decided to develop some GUI-based tools for my engine with it (it's much easier, than using C++ and external libraries like Qt or wxWidgets). I learned, that in C#, such dependencies are set using 'References':
I was very surprised, when I discovered, that this option is also applicable for C++ projects!
Indeed, after I created sample solution and set dependencies this way, everything was working fine, without any additional configuration like "Linker input" or something.
My question is: what does exactly this option do for C++ projects? I am interested in all profits and potential trade-offs.
I know already, that it causes linking output from other projects set as dependencies. Anything else? Perhaps some runtime dependencies between referenced modules? How does it affect generated output?