'ifort' is not recognized as an external or internal command.

'ifort' is not recognized as an external or internal command.

I am getting an error when trying to compile in VS2008.'ifort' is not recognized as an external or internal command.ifort command works fine in the IFC command prompt window.my nmake command is: nmake -f makerw(makefile) opt="winintl"(tells the nmake weather to use IFC or CFC.) debug="yes"

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You have to run your nmake command from a "Fortran Command Prompt" window, or run ifortvars.bat (with the ia32 or intel64 argument) from the window you want to use.

Retired 12/31/2016

so instead ofnmake -f makerw opt="winintl" debug="yes" in VS2008 under the solution properties, i should putifortvars.bat ia32 -f makerw opt="winintl" debug="yes"

Um, no, that won't help. You are invoking nmake from inside VS as a custom build step? Is this in a Fortran project?

ifortvars.bat sets up PATH and other environment variables so that the compiler can be located. This is not needed in VS for a Fortran project as the Fortran project system establishes these using the settings under Tools > Options > Intel Fortran.

Retired 12/31/2016

It is a fortran code developedoriginallyusing CFC. Now we are using IFC. It compiles fine from the IFC CMD window. Now I want to try an compile it using VS2008. I went in created a new makefile project.set up the debug config settingsset my NMake build command line as: nmake -f makerw opt="winintl" debug="yes"try to build and it does not know what ifort is.I checked tools > options > Intel Fortran and all of the path information is there. What do I need to do with the ifortvars.bat then?

I see - the problem is the use of a "makefile project". This won't use the settings from Tools > Options > Intel Fortran. I can think of two approaches.

1) Start VS from a Fortran Command Prompt window (devenv.exe). This will pick up PATH and other variables and that should do the trick.
2) Add the Fortran Executable, Include and Library paths to Tools > Options> Projects and Solutions > VC++ Directories. I'm unsure if this works for makefile projects.

Any particular reason you can't use a Fortran project for this instead of the makefiles?

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today