Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
272 Views

nmake command not recognized

Hello,

I am trying to use nmake to compile my program. I am using the Fortran Build Environment for Applications Running on Intel 64 (version 11.1.072) and cd to the subdirectory containing my makefile. Per the user guide, I made sure that /usr/bin and /usr/local/bin are in my PATH environment variable. However, when I try to use the command "nmake all" I see the error "'nmake' is not recognized as an internal or external command, operable program or batch file." Solutions to this problem on other forums have all suggested adding a path of visual studio tools, but as far as I can tell, those paths were already added. What do I need to do?

Thanks for your help on this (basic) question.

0 Kudos
12 Replies
Highlighted
272 Views

Well: /usr/bin and /usr/local/bin are Linux paths.

How are you launching the CMD for Visual Studio?

Start | All Programs | Visual Studio 2013 (or your version) | Visual Studio Tools

This launches an Explorer window, then for me

click on VS2013 x64 Native Tools Command Prompt

(I place the shortcut in my start menu)

If you do not launch the appropriate CMD window, you will not get the proper environment variables setup for VS.
Once there, then you will have to run the appropriate batch file to setup the IVF paths.

Jim Dempsey

0 Kudos
Highlighted
272 Views

Normally the Intel Fortran command prompt build environment will set a path that includes nmake. It could be that your adding Linux folders to PATH prevents it from being seen. nmake is in the same folder as link, so if Windows can't find nmake it won't be able to link a Fortran program either.

0 Kudos
Highlighted
Beginner
272 Views

Sorry about the Linux mix-up. I only added that after several failed attempts to run nmake. If I'm using the Fortran build environment, that IS the correct command window, right? Can you help clarify what definitively should be included in the path variable to ensure that it contains the 64 bit version of nmake? It looks like it is C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\amd64. Is that correct? I have added that to the path variable and it still doesn't recognize nmake. What should I be doing instead?

Thanks for all the help/patience.

0 Kudos
Highlighted
272 Views

That is the correct path - does nmake.exe exist in that folder?  When you installed VS2008, did you select the option for x64 support?

0 Kudos
Highlighted
Beginner
272 Views

nmake is in that folder, but not nmake.exe

And I am unsure if I selected the option for x64 support. Is there a way to check?

0 Kudos
Highlighted
272 Views

It probably is nmake.exe - Windows often "hides extensions for known file types". If you right click on it and select Properties, you'll see the full name.

If the folder and file are there, then you have x64 support installed. From that command prompt window, please do:

set path > path.txt

and then attach path.txt to a reply here so I can look at it.

0 Kudos
Highlighted
Beginner
272 Views

I've attached the file. Note that the final folder, "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\amd64" was added manually by me, but the nmake command did not work either before or after I added it.

0 Kudos
Highlighted
272 Views

Thanks. You have a typo in the path you added, using "ProgramFiles" instead of "Program FIles", and there's a leading blank that should not be there.

The underlying problem is that the command environment set up for you includes the x86_amd64 folder but not the amd64 folder. The latter includes nmake, the former does not. Really, for nmake, the 32-bit version would be fine, so if the "bin" folder (without /amd64) was added after the x86_amd64 folder, it would find nmake.

Interestingly, when I try 11.1 on my system, the PATH setup is different, with the /amd64 folder in path.

If you correct the addition to PATH it should work, though I am puzzled as to how you got what you did. Are you doing this on a 32-bit version of Windows?

0 Kudos
Highlighted
Beginner
272 Views

Thanks, fixing the typo got nmake to work! I'm not sure how I ended up with this PATH setup... I'm definitely using a 64-bit version of Windows.

0 Kudos
Highlighted
272 Views

Ok. I assume you know you are using a VERY old version of the compiler! I strongly recommend upgrading to the current version if you can.

0 Kudos
Highlighted
Beginner
272 Views

Yes--I'm using it for compatibility with existing code.

0 Kudos
Highlighted
272 Views

I doubt that there is really a compatibility issue. In most cases it's just that the software developer can't be bothered to try newer versions, but it's a disservice to users who have to chase after old, unsupported versions (not to mention a problem for us when customers ask us for help using 5+ year old versions that may not be supported on current operating systems.) But if it works for you, ok.

0 Kudos