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

ifort: error: could not find 'cl'

mohanmuthu
New Contributor I
806 Views
I have installed Intel Fortran 9.1 in 32-bit machine. When I compile a code 'test.f90', it gives

ifort: warning: Microsoft Visual C++ not found in path
ifort: error: could not find 'cl'

test.obj : fatal error LNK1136: invalid or corrupt file

I already had MS Visual Studio 2010 installed before Fortran installation. In one of the forum thread, I see a solution as, installation of MS SDK fix this issue, but appropriate version is missing there. Can I get the guidance to have working version of ifort9?

Thanks!
0 Kudos
4 Replies
mecej4
Honored Contributor III
806 Views
Please state which version of Windows this is on, and whether you tried to compile inside Visual Studio or at the command line. If from a command line, how was that command window launched?

Since Visual Studio 2010 came a few years after Intel Fortran 9.1, it is possible that the Visual Studio integrations do not work properly.
0 Kudos
mohanmuthu
New Contributor I
806 Views
Windows XP (32 bit)SP3 is my machine. I tried to integrated with VS2010, but I could not. When I asked here, I was told, integration of ifort9 and VS2010 is not possible.

I am trying to install VS2005 Express Edition for Fortran 9.1, but as of now, my plan is at least command line option. In program menu, I could see the link to launch the ifort9.1 compiler. Also, I checked just typing "ifort" in command line option. It works but getting above error.

If Intel Fortran 9.1 can be combined with VS 2005 Express Edition, then please help with what all pre-requisitis required for. If step-by-step procedure is already available, that would be much helpful.

Thanks!
0 Kudos
TimP
Honored Contributor III
806 Views
VS Express don't accept GUI integration of non-Microsoft compilers from Intel or anyone else. They would support only 32-bit command line operation. You must specify the path to Microsoft link manually (either in command line or in ifort.cfg). It's possible you might be able to do the same with VS2010 and not be limited to 32-bit mode.
0 Kudos
mecej4
Honored Contributor III
806 Views
An alternative to what TimP suggested is the following.

From the Start Menu, select the VS2005 Express Command Prompt. Create a small C program and compile it; failure indicates that you need to fix your VS2005 Express installation before attempting to get IFort 9.1 to work.

Once you can build C programs, from the same command window find and run the startup script IFORTVARS.BAT.

Create and build a small Fortran program. If this works, at this point you may modify the start-up scripts and/or the configuration file IFORT.CFG so that the environment is set up automatically.
0 Kudos
Reply