'How to make a new Visual Studio C++ project aware of an existing shared project?
The new(er) Shared C++ Project template in Visual Studio is much easier to use than previous ways code sharing was tackled. Adding one to your solution is as simple as "Add -> New Project -> Shared Items Project," and voilà! Any code inside that project is visible to all your existing projects just as if it existed in their own root directories.
Unfortunately, there is one potential hang-up: If you add new projects to your solution afterwards, they don't automagically see the shared project. (Not sure if this is true for all forms of VS C++ project templates, but it certainly occurs in the project types we were working with.)
If this were, say, a C# project, we could just add a reference. But C++ project properties don't provide such a simple method in this case.
As fun as it is running down linker errors, having to amend several of the project's dependency paths defeats the entire purpose of the shared project template. I've searched everywhere but I simply cannot find an explanation of how to make a new project "see" an existing shared project. Is there a simple way to fix this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
