![]() |
[Batch] Setting up Visual Studio build script
I am writing a script that will compile libraries using the Visual Studio compiler. But I am stuck with setting the Visual Studio environment variables. To do this I have to run the "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" file. If I start a command line client and runs the file it works fine, and I can run the compiler (cl.exe) without being in its directory. But If I do the same thing through by batch file, the command line client simply exits after the execution of the "vcvars32.bat file". Why? Tha batch file looks like this, so far...
:
"%VS90COMNTOOLS%vsvars32.bat"Thanks for your help! /Klarre |
Re: [Batch] Setting up Visual Studio build script
You misspelt "vcvars32.bat" in the batch file. Not sure if this is your problem, but it can't hurt to fix it.
|
Re: [Batch] Setting up Visual Studio build script
No, I spelled it correctly. But I wrote the wrong file in my description. It should be "c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat" .
Thanks! :) |
Re: [Batch] Setting up Visual Studio build script
You have to use the "call" command, otherwise the other batch file runs instead of your own (think goto, rather than function call).
:
call "%VS90COMNTOOLS%vcvars32.bat" |
Re: [Batch] Setting up Visual Studio build script
Ah, that solved the problem! Thanks a lot! :)
/Klarre |
| All times are GMT -5. The time now is 1:16 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC