Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29592 Discussions

Error while compiling using ifort from command line for fortran EM64T based applications

arijitde_ece
Beginner
1,339 Views
I installed the Intel fortran compiler 9.1 for Windows . I compiled a fortran file "1.f " using the command ifort from the command line using the build environment for Fortran EM64T based applications . I got the following error messages .
ifort: error: unable to run 'cl'
ifort: error: unable to run 'link'
The compilation worked fine when I used the build environment for Fortran fortran IA-32 application.
Can anybody help me out with the problem ? thank you
0 Kudos
1 Reply
TimP
Honored Contributor III
1,339 Views
ifort x64 requires either the VS2005 with the 64-bit add-on, or the Microsoft PSDK. You will find previous posts on this forum about those requirements.



If you have installed one of those prior to installing ifort, and still have this problem, open

program files (x86)intelcompilerfortran9.1em64tinifort.cfg

in wordpad or some other text editor. After the comment line

# Path to Microsoft linker
there should be a line

-Qlocation,link,":program files(path to directory where AMD64 LINK and CL reside)

Note that the Microsoft cl and link are in an AMD64 directory in the (64-bit) Program Files, while ifort (for all Windows target architectures) goes in the (32-bit) Program Files (x86).

If you don't have this -Qlocation line, which you can add yourself, after finding the link.exe, ifort will not run the link phase.

The ifort 9.x installation doesn't set this up reliably, when you have the VS or SDK installed on some partition other than C:.


Apparently, this is considered too unusual to be corrected.

Less likely to fail to install correctly, if you have a correct MS setup, but also required, is the ifortvars.bat in the same folder as ifort.cfg. Among other things, it must contain a line like

@call "c:program filesMicrosoft .......vcvars...bat

which runs the same script as the Start menu item for the Microsoft CL-64 command prompt window. If the installation didn't complete correctly, that line would normally be commented out, and there would be an error message generated by ECHO commands there when you open an ifort Build Environment command line window.

If you would be more specific about your Microsoft CL X64 installation, you could eliminate some of the possibilities I mentioned, and maybe get better assistance. It may help to know whether ifort installation popped up a window asking you to browse to that installation, and what comes up when you open the ifort Build Environment.
0 Kudos
Reply