How to set relative include path in Visual Studio 2010?
path, visual-studio
Solution
Use the `$(SolutionDir)` or `$(ProjectDir)` MSBuild properties to root the paths. These are replaced at build-time with the directory in which the Solution and Project are located, respectively.
Problem
I wrote a library called MyLib with some Visual Studio projects in MyLib\Samples\, and the include files reside in MyLib\inc. In order to make these include files accessible in the projects, I need to add their path in the project properties. I want to use a relative path, so that I don't need to change the properties each time I move the whole library folder to other places. But what does the relative path look like? For example, one of the project path is: ...\MyLib\Samples\proj1, how do I represent the ...\MyLib\inc relative to the project path?