# FinalBuilder 6: calling nmake

**URL:** https://www.finalbuilder.com/forums/t/finalbuilder-6-calling-nmake/1939
**Category:** Discussion
**Created:** [February 2, 2012, 3:44am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-6-calling-nmake/1939 "2012-02-02T03:44:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [February 2, 2012, 3:44am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-6-calling-nmake/1939/1 "2012-02-02T03:44:18Z")

</div>

I have a qt (Nokia) project which I want to build with VS2005

First I create the makefiles with

```
qmake MyProject.pro -r spec win32-msvc2005
```

Than I want to build. On a Command prompt I have to call vsvars32 first:

```
C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools\vsvars32.batnmake /f Makefile.Release
```

Creating the makefiles in FinalBuilder (6) is no problem, but calling nmake fails. How do I setup the VS environment variables, resp. call vsvars32.bat?

Thanks Christian

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [February 2, 2012, 10:18am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-6-calling-nmake/1939/2 "2012-02-02T10:18:53Z")

</div>

Hi Christian   
  
 If you look at the vcvars.bat file, you will see it just declares some environment variables. So what you need to do is figure out which ones you need, and define them in your FinalBuilder project as project variables, and check “Make available as Environment Variable” option when defining them.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [February 3, 2012, 7:37am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-6-calling-nmake/1939/3 "2012-02-03T07:37:53Z")

</div>

Thanks Vincent   
  
 Your solution would work, but is definitely not a beautiful one.   
 - if vsvars32 gets an update, I have to review every variable   
 - tons of variables   
 - no easy switch between different VS versions (different projects based on different VS)   
  
 Is there no way to pre-run vsvars32 in the same step as calling nmake?   
 I’m sure im not the only one who want to build makefiles with VS.   
  
 Thanks   
 Christian

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [February 3, 2012, 9:26am UTC](https://www.finalbuilder.com/forums/t/finalbuilder-6-calling-nmake/1939/4 "2012-02-03T09:26:21Z")

</div>

Hi Christian   
  
 The only way to run it in the same process would be to create a batch file and run that from FinalBuilder.
