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

Strange characters added to my output file name

Tomasz_Krzyzelewski
975 Views
Hi,

I'm trying to compile a file and when it comes to linking I get the following error (note the strange 3 characters added before -out):

Microsoft Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

-out:myFile.exe
-subsystem:console
/LIBPATH:c:\\mpi\\em64t\\lib
impi.lib
myFile.obj
LINK : fatal error LNK1181: cannot open input file "-out:myFile.exe"
ERROR in the compiling/linking [1181]

The same errors apears on Windows Server 2003 Ent x64 and Windows XP x86.

I've tried /exe and /Fe option and the same problem occurs.

Please help.
Thanks
Tomasz
0 Kudos
6 Replies
Steven_L_Intel1
Employee
975 Views
Which compiler are you using? You're ending up with the linker from Visual Studio 98, which is not supported with Intel Fortran. How are you establishing the compile environment on the compile line?
0 Kudos
Tomasz_Krzyzelewski
975 Views
Hi Steve,

Thanks for your reply.

I've downloaded Intel Parallel Studio XE 2011 for Windows. I use ifort compiler and it doesn't return any errors.
The linker was included in the package I got from Intel. Is there any way I could upgrade it?
It was my first attempt to use mpif90 and I didn't include any environment options. If I run mpif90 with /c it compiles without any problem. I tried to run xlink separately and I got the same error message.

Cheers
Tomasz
0 Kudos
Wendy_Doerner__Intel
Valued Contributor I
975 Views
Tomasz,

It sounds like you are calling the compiler from the command line. Can you include your command line and results? Also, please try using ifort to do the link. It sounds like when you run xlink seperately you are picking on an old linker on the system and not the one that ships with Intel Parallel Studio XE.

If you already have a version of Visual Studio on the system the VS 2008 shell (what we ship with Intel Parallel Studio XE) will not install on your system.

------

Wendy

Attaching or including files in a post

0 Kudos
TimP
Honored Contributor III
975 Views
A correctly configured mpif90 would use ifort to find the correct linker. mpif90 -V would show the same as ifort -V. According to my colleagues, both the latest update of MPICH2 x64 and Intel MPI x64 are excellent. It would help if you would tell which MPI, which Windows version, and your -V indications.
If you have a link.exe on PATH other than the one associated with ifort, you should set the -Q,location option to point to the correct Visual Studio directory for link.exe (either in ifort.cfg or on your command line).
0 Kudos
Tomasz_Krzyzelewski
975 Views
Hi everyone,

Thanks a lot for your help.

You were right about the '98 linker. I didn't know there was one on my system and xlink.exe simply finds one and uses it. I thought xlink.exe was a linker provided by Intel. With a correct path to VisualStudio 2010 linker everything compiles and runs without any problems.

Cheers
Tomasz
0 Kudos
Steven_L_Intel1
Employee
975 Views
xilink is a "prelinker" that Intel provides. It then calls what it thinks is the correct MS linker. If the paths are not set up correctly, it won't find it.
0 Kudos
Reply