In Visual Studio when I want use existing project in my solution I can either add it as a reference, or add it as a statically linked lib in other project properties. I'm confused when I should use with option and which benefits those two approached has. PS: talking about C++ projects.
In my opinion, when a project needs to use a library, you have to do at least two things:
File When there are multiple projects in your solution, for example, Project A is exe and Project B is static lib. If Project A depends on Project B, you need to do three things:
Since the above actions are standard actions, VS provides a function called Add Reference, which automatically completes these two actions:
If you want to konw more information, you could refer to Microsoft Docs about Create and use a static library and Manage references in a project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With