Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How does MSVC++ 6.0 determine the PATH for builds

Posted on 2008-10-21
3
Medium Priority
?
354 Views
Last Modified: 2012-08-14
How does MSVC++ 6.0 determine the value of the PATH environment variable for a build?  When I dump the path using a custom build step.  When I dump the PATH from a command line, it is different.  Example shown below.  I guess I was expecting it to use the same PATH in MSVC++ 6.0 that I see from the command line.

From build:

Performing Custom Build Step on .\Debug\PathTest.exe
PATH=C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\VC98\BIN;C:\Program Files\Microsoft Visual Studio\Common\TOOLS;C:\Program Files\Microsoft Visual Studio\Common\TOOLS\WINNT;C:\Program Files\Spe
cial\IBM\WebSphere MQ\Java\lib;C:\Oracle\ora920\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Symantec\pcAnywhere;C:\Program Files\Nestle\MSTools;C:\PROGRA~1\Special\IBM\IMNNQ;C:\Program
 Files\Special\SQLLIB\BIN;C:\Program Files\Special\SQLLIB\FUNCTION;C:\Program Files\Special\SQLLIB\SAMPLES\REPL;C:\Program Files\Special\SQLLIB\HELP;C:\Program Files\Special\IBM\WebSphere MQ\bin;C:\Program Files\Special\IBM\WebSphere MQ\tools\c\samp
les\bin;C:\Program Files\special\Rational\common;C:\Program Files\special\Rational\ClearCase\bin;C:\Program Files\Special\Rogue Wave\Stingray Studio\Bin;C:\Program Files\Special\Rogue Wave\Stingray Studio\Lib;C:\Program Files\Special\Rogue Wave\Stin
gray Studio\Regex\Lib\VC6

From command line:

H:\>PATH
PATH=C:\Program Files\SAP\FrontEnd\SAPgui\wwi\;C:\Program Files\Special\IBM\WebSphere MQ\Java\lib;C:\Oracle\ora920\bin;C:\Program Files\Oracle\jr
e\1.1.8\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Symantec\pcAnywhere\;C:\Program Files\Nestle\MSTools\;C:\PROGRA~1\
Special\IBM\IMNNQ;C:\Program Files\Special\SQLLIB\BIN;C:\Program Files\Special\SQLLIB\FUNCTION;C:\Program Files\Special\SQLLIB\SAMPLES\REPL;C:\Pr
ogram Files\Special\SQLLIB\HELP;C:\Program Files\Special\IBM\WebSphere MQ\bin;C:\Program Files\Special\IBM\WebSphere MQ\tools\c\samples\bin;C:\Pr
ogram Files\Special\JProbe Suite 5.2.0\bin;C:\Program Files\Special\Lotus\Notes;c:\source\utility\sndmail;c:\Program Files\Microsoft SQL Server\9
0\Tools\binn\;C:\Program Files\Special\apache-ant-1.6.5\bin;C:\Program Files\Special\TortoiseCVS;C:\Program Files\QuickTime\QTSystem\;C:\Program
Files\Special\Rational\common;C:\Program Files\Common Files\Adaptec Shared\System;C:\Program Files\Remote Desktop
0
Comment
Question by:jribble
  • 2
3 Comments
 
LVL 5

Expert Comment

by:jose_juan
ID: 22774007
Hi,

all VS versions have a command line shortcut (to a batch file), this batch set all concrete variables for your VS version.

Try check it (is in VC directory).

Good luck!
0
 

Author Comment

by:jribble
ID: 22812763
I see what you are saying, but it seems I am missing something.  I would expect the build PATH being used to be the same as the PATH from a command line with the extra items added, but that is not the case (see below).  Do you know any reason why this would be so?

Performing Custom Build Step on .\Debug\PathTest.exe
PATH=
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;
C:\Program Files\Microsoft Visual Studio\VC98\BIN;
C:\Program Files\Microsoft Visual Studio\Common\TOOLS;
C:\Program Files\Microsoft Visual Studio\Common\TOOLS\WINNT;
C:\Program Files\Special\IBM\WebSphere MQ\Java\lib;
C:\Oracle\ora920\bin;
C:\Program Files\Oracle\jre\1.1.8\bin;
C:\WINNT\system32;
C:\WINNT;
C:\WINNT\System32\Wbem;
C:\Program Files\Symantec\pcAnywhere;
C:\Program Files\Nestle\MSTools;
C:\PROGRA~1\Special\IBM\IMNNQ;
C:\Program Files\Special\SQLLIB\BIN;
C:\Program Files\Special\SQLLIB\FUNCTION;
C:\Program Files\Special\SQLLIB\SAMPLES\REPL;
C:\Program Files\Special\SQLLIB\HELP;
C:\Program Files\Special\IBM\WebSphere MQ\bin;
C:\Program Files\Special\IBM\WebSphere MQ\tools\c\samples\bin;
C:\Program Files\special\Rational\common;
C:\Program Files\special\Rational\ClearCase\bin;
C:\Program Files\Special\Rogue Wave\Stingray Studio\Bin;
C:\Program Files\Special\Rogue Wave\Stingray Studio\Lib;
C:\Program Files\Special\Rogue Wave\Stingray Studio\Regex\Lib\VC6

PATH from command line:

H:\>PATH
PATH=
C:\Program Files\SAP\FrontEnd\SAPgui\wwi\;
C:\Program Files\Special\IBM\WebSphere MQ\Java\lib;
C:\Oracle\ora920\bin;
C:\Program Files\Oracle\jre\1.1.8\bin;
C:\WINNT\system32;
C:\WINNT;
C:\WINNT\System32\Wbem;
C:\Program Files\Symantec\pcAnywhere\;
C:\Program Files\Nestle\MSTools\;
C:\PROGRA~1\Special\IBM\IMNNQ;
C:\Program Files\Special\SQLLIB\BIN;
C:\Program Files\Special\SQLLIB\FUNCTION;
C:\Program Files\Special\SQLLIB\SAMPLES\REPL;
C:\Program Files\Special\SQLLIB\HELP;
C:\Program Files\Special\IBM\WebSphere MQ\bin;
C:\Program Files\Special\IBM\WebSphere MQ\tools\c\samples\bin;
C:\Program Files\Special\JProbe Suite 5.2.0\bin;
C:\Program Files\Special\Lotus\Notes;
c:\source\utility\sndmail;
c:\Program Files\Microsoft SQL Server\90\Tools\binn\;
C:\Program Files\Special\apache-ant-1.6.5\bin;
C:\Program Files\Special\TortoiseCVS;
C:\Program Files\QuickTime\QTSystem\;
C:\Program Files\Special\Rational\common;
C:\Program Files\Common Files\Adaptec Shared\System;
C:\Program Files\Remote Desktop

0
 
LVL 5

Accepted Solution

by:
jose_juan earned 2000 total points
ID: 22813564
Uhm...

the PATH is set for each user account...

Check your own PATH.

Check what user are in build step.

What type project you are using?

Also, you can try to debug all process (childs from your execution) and subprocess (e.g. file I/O access) to check all process and possible access to PATH environment variable.

Good luck!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question