Is it possible to set an Include search path that will incorporate all projects of a solution?
Here's why I'd like to have that. Maybe someone can offer a neater solution:
Assume you have a multi-project solution. Each project consists of many classes. Each class is implemented as a source+header file.
Some of the projects need to call classes from sibling projects. To do that they require to#include the header file of the called class.
Here are some options that I can think of:
- #include "..\Proj1\Class2.h"
- #include "Class2.h" + add ..\Proj1 to include search path
- #include "Class2.h" + move Class2.h to ..\Include + add $(SolutionDir)Include to include search path
Each option has its fortes and drawbacks:
Option 1: Probably simplest but writing a source file requires knowledge of file structure.
Option 2: Much maintenance and very long search path
Option 3: Much maintenance and requires braking the VC++ directory structure.
I await your opinion.