views:

866

answers:

5

I can't believe I am asking this...

It has been a while since I used VC6. I set up what I thought was the correct way to include additional directories for include files (I removed another developer's hard coded paths) and put in something like:

%MY_DIR%\include

but this does not work. Am I missing something? Did VC6 not allow this? It seems like a pretty basic thing to have and now that I think about it it I can't recall ever having done it before...

(I did stop and re-start VC6 after I set the variables)

Google search and a quick search here did not reveal anything.

EDIT

Apparently I can't vote for my own answer - but it is below:

The syntax is:

$(ENV_VAR)

not

%ENV_VAR%

A: 

did you try using the /useenv flag (you have to launch from the command line).

cbrulak
I am not sure what you mean by this? Can you elaborate please?
Tim
Are you sure this is for VC6 and how does that have anything to do with a specific project? It appears that the functionality I want is not available.
Tim
oh, well, if you open cmd.exe, type "devenv.exe" and see what happens. You may have to run a couple of other commands first, let me know.
cbrulak
A: 

I'd rather not have to add to an include env variable - that seems to imply that I have to build from a command line now. I want to be able to add an environment variable in the project settings. That seems like a very simple thing to do, but perhaps that was expecting too much from the IDE team.

I am not sure what it means that %MY_DIR% is not taken into account properly... I did start cmd.exe from the tools menu like you suggested and the env path I set is there and as expected.

Tim
A: 

I don't think that the IDE will take any environment settings unless you use that flag.

Oh, and you don't have build from the command line if you launch it from the command line. You can still use the build menu in the IDE.

cbrulak
It does not work. I started msdev /useenv and I get the same results. Thanks anyway.
Tim
I think Ferruccio's first answer is probably best, have you tried that one?
cbrulak
A: 

I was just checking the msdn docs for VC6.0. I don't think it actually supports that switch, that must have been introduced in 7 or 7.1

Sorry about that.

cbrulak
+3  A: 

Here's the answer...

it works fine.

$(ENV_VAR_NAME) not %ENV_VAR_NAME%

(I feel like an idiot. )

Tim