Sorry to post c++ question here. But I get this question when learning Ogre. Don't laugh too much if you find the question is too easy.
How to set the relative path in c++.net? eg. I want to set "Additional Include Directories", but don't know how to calculate the relative path.
Thanks!
a c++ question
-
alphabeta
- Kobold
- Posts: 34
- Joined: Mon Jan 03, 2005 5:07 am
-
monster
- OGRE Community Helper

- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
[moved to Back to Basics]
Rather than specifying the path explicitly you specify it relative to where the project file is.
So if your include files are in
And your project file's in
Then you'll want to set your additional includes relative path to
i.e. one "dot dot" takes you up from the VC7.1 folder to scripts, the other takes you up to MyDemo and then the include takes you back down into the include folder.
So assuming you extracted the Ogre distribution under C:\Development and then renamed it to ogre-0.15.1 then, from your project, the relative path to the Ogre includes would be;
Hope that makes sense!
Rather than specifying the path explicitly you specify it relative to where the project file is.
So if your include files are in
Code: Select all
C:\Development\ogre-0.15.1\MyDemo\includeCode: Select all
C:\Development\ogre-0.15.1\MyDemo\scripts\VC7.1Code: Select all
..\..\includeSo assuming you extracted the Ogre distribution under C:\Development and then renamed it to ogre-0.15.1 then, from your project, the relative path to the Ogre includes would be;
Code: Select all
..\..\..\OgreMain\include-
limbo
- Kobold
- Posts: 27
- Joined: Fri Dec 10, 2004 7:08 am
-
limbo
- Kobold
- Posts: 27
- Joined: Fri Dec 10, 2004 7:08 am