# VC++ 6 env. var. paths

This topic is 4975 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've got VC++ 6.0 with SP5. I get the impression that the IDE is not capable of handling environment variables properly in some path settings. My env. var is MEWPATH=D:\Mew Setting the "output file name" and "executable for debug session" to: $(MEWPATH)\Build\Debug\MewEditorD.exe "Working directory" to:$(MEWPATH)\Build\Debug Building it is fine, but using the "execute program" buttons yields: "D:\Mew\MewEditor\\$(MEWPATH)\Build\Debug\MewEditorD.exe file does not exist. Do you want to build it?" VC++ 6 seems to be utterly incapable of concatenating paths with environement variables in some instances. I mean, it can build and include things using paths with env. vars. That's the compiler, but the IDE just doesn't seem to handle this properly, am I right? Any workarounds? Surely many programmers want to avoid typing absolute paths in their projects for mobility. I assume these should be well known VC++ 6 issues, but I haven't found anything about it. If VC++ 6 is screwed, are the .NET IDE:s any better? Thanks, Christer

##### Share on other sites
I never tried the environment variable approach, but I did use relative paths as much as possible to make my projects portable between developers.

##### Share on other sites
I use Visual C++ Toolkit 2003 so i'm not sure what your problem is, but i'll sugest a workaround.

Go to [control panel]->[system icon]->[advanced folder]->[environment variables button] and just do it from there.

##### Share on other sites
The problem is that VC++ 6 doesn't seem to handle environment variables in its IDE specific path settings. It seems to just think of them as filenames/folders and doesn't expand them into their real meaning. This only happens with IDE path properties, like the "executable for debug session". The compiler can handle environment variables for things like include and library directories. So is the IDE really messed up on this point? It's just very annoying, having lots of projects in a workspace that I were to alter if I'm to move the projects to a new folder, instead of editing a few environment variables with the new paths.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 10
• 11
• 13
• 9
• 11
• ### Forum Statistics

• Total Topics
634090
• Total Posts
3015432
×