Using NMAKE to build C++ app - Falling over

C

Catweasel

Hi all,

I'm new to C++ and .Net but I have been giving the task of building a
C++ application using NMAKE. Simple huh?

I have visual studio .net installed and therefore VC++7.0. However
when ever I try to run NMAKE from the dos prompt it is unable to find
any header files that have been included, for example stdio.h.

Do I need to add certain directories to my path variable in windows?
I thought VS.net would have taken care of this.

The guidlines for the application which needs to be built are a little
hazy in the following respect. In one place it mentions VC++ v5 or
V6 should be used to build the appliaction using NMAKE. In other
places it says v5 or above. The application is relatively new
(FlexLMv6).

Any help would be much appreaciated.
 
C

Carl Daniel [VC++ MVP]

Catweasel said:
Hi all,

I'm new to C++ and .Net but I have been giving the task of building a
C++ application using NMAKE. Simple huh?

I have visual studio .net installed and therefore VC++7.0. However
when ever I try to run NMAKE from the dos prompt it is unable to find
any header files that have been included, for example stdio.h.

Do you have VC7 or VC7.1 (VS.NET 2002 or VS.NET 2003)?
Do I need to add certain directories to my path variable in windows?
I thought VS.net would have taken care of this.

Run vcvars32.bat - it's installed in the vc7\bin directory of your Visual
Studio installation. Alternatively, open a "Visual Studio Command Prompt".
A shortcut to do that was also installed with Visual Studio.
The guidlines for the application which needs to be built are a little
hazy in the following respect. In one place it mentions VC++ v5 or
V6 should be used to build the appliaction using NMAKE. In other
places it says v5 or above. The application is relatively new
(FlexLMv6).

As an general rule, VC7 or VC7.l can be dropped into any command-line build
environment where VC6 or VC5 was used. One notable exception is use of
libraries: If you're intending to link a 3rd party C++ (not C) library with
your applicaiton, make sure you have a VC7 (or 7.1 as the case may be)
version of that library.

HTH

-cd
 
C

Catweasel

Thanks very much for your help. I have VS .net 2003. It worked fine
from the VS command prompt. I didn't realise their was a specific
command line tool :blush:ops:

Unfortunately I have another problem now whilst try to link my files
when building .exe

I get the following error

LINK : fatal error 1104 cannot open file lmgr.lib

I have no idea why. The directory that holds this file is outside the
project folder but in the path. Could this be the problem?

<edit>I've managed to solve this now. Was an issue with paths
used in linking</edit>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top