Skip to main content
GameDev.net gamedev.net
🔒 Locked

VC++ Common Code Directory

Started by Quat Jul 29, 2007 at 12:33 AM 2 replies 800+ views
Original Post
Quat
Quat
I have some .cpp and .h files I use for several projects. Right now I am doing something like: #include "../Core/file.h" Is there a way to get rid of the "../"? I know I can add a search path in VC++ under Tools->Options, but maybe there is another way? For example, the DirectX samples use a common code, too, and I opened up one of their projects and just #include "DXUT.h" was enough. And they didn't add a search path to the folder that file is in. So how did they do it?
-----Quat
antimouse
antimouse
Probably, this DXUT.h file includes some other header file, which includes the needed headers using the full path in the #include directive.
I'm just guessing, I'm not sure about it. I can't figure out other way to do this.
dormlock
dormlock
DirectX uses an environment variable to speify it's root path. You can see this by looking under properties for my computer. For vista it's under the advanced tab then the environment variables button.
Wolfdog
Wolfdog
Couldn't you add it to the Project Properties. Configuration Properties->C/C++->General. Then add "../" to Additional Include Directories.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.