![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
Join Date: May 2005
Location: Sweden
Posts: 281
Rep Power: 3
![]() |
[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" pause Thanks for your help! /Klarre
__________________
http://www.klarre.se |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,435
Rep Power: 8
![]() |
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.
|
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: May 2005
Location: Sweden
Posts: 281
Rep Power: 3
![]() |
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! ![]()
__________________
http://www.klarre.se |
|
|
|
|
|
#4 |
|
Expert Programmer
Join Date: Jun 2005
Posts: 799
Rep Power: 3
![]() |
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" |
|
|
|
|
|
#5 |
|
Professional Programmer
Join Date: May 2005
Location: Sweden
Posts: 281
Rep Power: 3
![]() |
Re: [Batch] Setting up Visual Studio build script
Ah, that solved the problem! Thanks a lot!
![]() /Klarre
__________________
http://www.klarre.se |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compiling .cpp file using Microsft Visual Studio 2005 | sharadpro | C++ | 17 | Mar 28th, 2006 6:50 AM |
| Visual Studio vs Visual C++ | NightShade01 | C++ | 14 | Feb 26th, 2006 9:39 AM |
| Moving code from Visual Studio 2005 to Visual Studio 2003 and back. | Kami | Other Programming Languages | 1 | Jan 11th, 2006 9:35 PM |
| Visual J# & Sun Java Studio Enterprise | ReggaetonKing | Java | 0 | Dec 6th, 2005 7:14 AM |
| Microsoft, visual studio and circles | bja888 | Other Programming Languages | 7 | Oct 21st, 2005 4:28 AM |