| Christoffer Bergman 2004-07-28, 4:00 pm |
| Hello
I want to run a program (in my case doxygen) as a Post-Build Step in Visual Studio 6. However, I don't want to get a compile error if doxygen isn't installed, so therefore I have created a bat file that ends with echo (that will always succeed), like this
:
postbuild.bat:
doxygen doxyfile
echo COMPLETE
Now I enter this bat-file into the Post-Build Step of my Visual C++ project, but it doesn't work. It can't find doxygen. But if I try to run postbuild.bat myself in a command prompt it works fine.
This caused me to make a small test. I wrote another bat-file with only one line:
echo %PATH%
When I run this bat-file myself I see the entire path for the computer (including the doxygen path), but when I run it as a Post-Build Step in Visual Studio I only get a few Visual Studio specific paths:
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:\WINNT\syste
m32;C:\WINNT
I have tried to restart Visual Studio just to make sure it has reloaded the environment variables.
Does anybody know what's wrong? Why does Visual Studio have incorrect PATH? How do I solve this problem? Or is there another solution for how to run dosxygen (or any other program) without hardcoding the path to the binary, and without getting compile err
ors if the program isn't installed.
Thanks
Christoffer
|