Doubt about VS 2005.
Sorry to bother, I know this is a pretty lame question and probably there must be a thread already asking for this but I not even know how to name it appropriately.
How the hell do I tell Visual Studio to search for include paths starting from a root directory and NOT from the file location??
An example:
This is my working directory: \Source\components_source
And there is this file: components_source\link\device\SBRDevice_link.h
With this include: #include "memory\client\SBR_memory.h"
The directory memory is on the same level as the link directory and I want VS to use components_source as the root directory and not from SBRDevice_link.h.
Have I been clear?
Add the appropriate redirection to include path, something like:"$(SolutionDir)..\" or "$(ProjectDir)..\..\component_source\"
As far as I know this has always worked for me. If I do
#include "memory\client\SBR_memory.h"
it will search from my project root directory. Perhaps you've made inappropriate edits in your project settings?
EDIT: I even tried it now and it definitely works.
.../MyProject/MyFolder/MyHeader.h
.../MyProject/MyFolder2/MyHeader2.h
MyHeader.h:
#include "MyFolder2/MyHeader2.h"
works perfectly fine. Am I misunderstanding you?
#include "memory\client\SBR_memory.h"
it will search from my project root directory. Perhaps you've made inappropriate edits in your project settings?
EDIT: I even tried it now and it definitely works.
.../MyProject/MyFolder/MyHeader.h
.../MyProject/MyFolder2/MyHeader2.h
MyHeader.h:
#include "MyFolder2/MyHeader2.h"
works perfectly fine. Am I misunderstanding you?
This is exactly what I need Antheus.
But where is this include path precisely?
I already look at google and found no helpful information. i even look field by field in the project properties window and found nothing.
Obviously I am missing something.
But where is this include path precisely?
I already look at google and found no helpful information. i even look field by field in the project properties window and found nothing.
Obviously I am missing something.
Quote:Original post by Dogh Quch
This is exactly what I need Antheus.
But where is this include path precisely?
I already look at google and found no helpful information. i even look field by field in the project properties window and found nothing.
Obviously I am missing something.
Project Settings (Alt+F7) -> Configuration Properties -> C/C++ -> General -> Additional Include Directories.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement