- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so instead ofnmake -f makerw opt="winintl" debug="yes" in VS2008 under the solution properties, i should put
ifortvars.bat ia32 -f makerw opt="winintl" debug="yes"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 settings
set 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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
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?
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page