Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 28th, 2008, 2:54 PM   #1
Klarre
Game engine designer
 
Klarre's Avatar
 
Join Date: May 2005
Location: Sweden
Posts: 314
Rep Power: 4 Klarre is on a distinguished road
[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
The "pause" line is never reached.

Thanks for your help!

/Klarre
__________________
http://www.klarre.se
Klarre is offline   Reply With Quote
Old Mar 28th, 2008, 3:23 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
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.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Mar 28th, 2008, 3:39 PM   #3
Klarre
Game engine designer
 
Klarre's Avatar
 
Join Date: May 2005
Location: Sweden
Posts: 314
Rep Power: 4 Klarre is on a distinguished road
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
Klarre is offline   Reply With Quote
Old Mar 28th, 2008, 7:13 PM   #4
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 894
Rep Power: 4 The Dark is on a distinguished road
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"
The Dark is offline   Reply With Quote
Old Mar 28th, 2008, 9:03 PM   #5
Klarre
Game engine designer
 
Klarre's Avatar
 
Join Date: May 2005
Location: Sweden
Posts: 314
Rep Power: 4 Klarre is on a distinguished road
Re: [Batch] Setting up Visual Studio build script

Ah, that solved the problem! Thanks a lot!

/Klarre
__________________
http://www.klarre.se
Klarre is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling .cpp file using Microsft Visual Studio 2005 sharadpro C++ 17 Mar 28th, 2006 7:50 AM
Visual Studio vs Visual C++ NightShade01 C++ 14 Feb 26th, 2006 10:39 AM
Moving code from Visual Studio 2005 to Visual Studio 2003 and back. Kami Other Programming Languages 1 Jan 11th, 2006 10:35 PM
Visual J# & Sun Java Studio Enterprise ReggaetonKing Java 0 Dec 6th, 2005 8:14 AM
Microsoft, visual studio and circles bja888 Other Programming Languages 7 Oct 21st, 2005 5:28 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:03 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC