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

ifort: error #10037: could not find 'link'

pedro_andreoki_se
1,939 Views

I am running version 12.1.2.278 build 20111128 under Windows 7/64, together with MS Visual Studio 2010 SP1.

After installing the most recent updates, including MS Visual Studio, I am having this problem which seems to be an old one (what I see from internet questions).

Compiling and running works fine from within Visual Studio, but if I run the compiler as the command ifort I get the obj file but it doesnt link, producing the error mentioned.

Your previous response to this kind of problem (from 2008!) does not seem to work with Windows 7, and I do not get an answer from Intel Premier Support. Is this common from your "premier"?. What a poor service!.

0 Kudos
13 Replies
Steven_L_Intel1
Employee
1,939 Views
I am sorry to hear that you have had a problem with Intel Premier Support. Would you please tell me the Premier Support issue number so that I can see what happened?

How are you starting the command prompt session? Please show me a log of the console session from the beginning, including the output displayed when the session starts.
0 Kudos
TimP
Honored Contributor III
1,939 Views
The link setup relies on your having installed the VS2010 C++ development option prior to installing ifort. If you haven't done so, you can return to VS2010, add C++, then return to ifort setup/repair. The only difference from VS2008 is that the VS2010 C++ option always includes X64 support.
0 Kudos
pedro_andreoki_se
1,939 Views
I wrote directly to quadsupport because the premier.intel.com web page said it could not recognize my premier number (I believe my license is [deleted]).

As for your question I simply open a DOS windows in the directory whre the .for file is, and issue a command
> IFORT file.for
which yields the file.obj and the
ifort: error #10037: could not find 'link'.

Unfortunately I don't know how to extract (write to an extrnal file) the console session in a DOS window, but these two lines are the only information displayed.


When I did the upgrade to the recent versions, I installed first the Intel compilar, and I was then instructed to install the Visual Studio. This means that Visual Studio was upgraded AFTER the Intel compiler. Could this have something to do?.

My goal is to have a simple bat file to compile and link with the relevant switches, optimization, etc.
0 Kudos
TimP
Honored Contributor III
1,939 Views
Yes, after you installed Visual Studio, so that CL works in the command prompt, you must repeat the ifort installation, in order for the ifortvars.bat files to include automatically the iccvars.bat files to set up link path. No harm done, you simply need to update the ifort installation.
0 Kudos
Steven_L_Intel1
Employee
1,939 Views
The quadsupport email address is not the normal support channel - it is mainly for questions about getting access to Premier Support and it can take several days for a delay.

Please do not post serial numbers in the forum - I removed it,. I do see that you have current support and that you have an active Premier Support login. Your login ID is your email address. If you are unable to log in to Premier Support I will ask one of our specialists to help you.

In addition to what Tim says, you need to either start the command session with one of the shortcuts provided when the compiler installs under Intel Parallel Studioi XE > Command Prompt. Or have your .bat file invoke the compilervars.bat file with the appropriate arguments as described in the documentation.
0 Kudos
pedro_andreoki_se
1,939 Views

I am sorry but I need you to be more specific. I have found the bat files, but where do i find the ppropriate arguments'?. The documentation is enormous!, and links jump from one place to another.
Since the first day I have complained on the lack of clarity of your 'primers' documentation, sorry, a step-by-step set of instructions is clearly missing.This 'learning by trial' is an enormous waste of time.

0 Kudos
Steven_L_Intel1
Employee
1,939 Views
If you do not want to use the provided shortcut to establish the Intel Fortran environment, then execute this command at the start of your session:

"%IFORT_COMPILER12%\bin\compilervars.bat" ia32 vs2010

The ia32 should be replaced with intel64 if you want to build for x64. Thesecond argument is the version of Visual Studio you are using, though you can omit that to use the one selected as default during installation.

If you open the documentation and click the large Start Here link, you are presented with two choices: Using Microsoft Visual Studio and Using the Command Line. If you select the latter, you are led through the steps for using the command line.
0 Kudos
pedro_andreoki_se
1,939 Views
this compilersvars.bat seems to be what I was missing.

My misunderstanding of the meaning of the sentence "Under normal circumstances, you do not need to run the compilervars.bat batch file. The Fortran command-line window sets these variables for you automatically."

I tried to activate this, as the manual says, but my nstalled product appears as

Intel Parallel Studio XE 2011/Parallel Studio XE 2011 with VS 2010

and in the command window which appears, says "command ifor is not valid" if I try to issue an "ifor file_X.for".

0 Kudos
Steven_L_Intel1
Employee
1,939 Views
The command is ifort.
0 Kudos
pedro_andreoki_se
1,939 Views
Indeed. It does not work with ifort.
Do i need to set the environment too if I am using the comand line fom within Visual Studio?. This is not what I interpret from the instructions
0 Kudos
Steven_L_Intel1
Employee
1,939 Views
Did you mean to say "it does work with ifort"?

How would you be "using the command line form from within Visual Studio"? If you are building from within Visual Studio, you do not need to use compilervars.bat - the necessary definitions are read from the registry.
0 Kudos
pedro_andreoki_se
1,939 Views

Steve

Why when I select the Post/reply from below I do not have the option to reply? See attach ( cannot attach an image, this system asks for an URL, not for one of my directories). And the link to "view" does not show your most recent response. Each time I respond to your threads I have to "invent" something.

Indeed it does not work. I don't need to run the command in Visual studio, but I wonder what is the purpose of the "command window" which appears

0 Kudos
Steven_L_Intel1
Employee
1,939 Views
You seem to be doing fine with replies - I don't understand what you are seeing.

Click on the link in my signature below for how to attach a file.

In VS2008 and earlier there is a Tools > Visual Studio Command Prompt item, but choosing that will not let you build Fortran applications - it is a Microsoft tools only environment. If you want to use the command line, please use one of the shortcuts we install in the Start menu (feel free to copy one of these to your desktop and customize it - that's what I do.) VS2010 doesn't have this option.
0 Kudos
Reply