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

Linker error

reidar
New User
2,113 Views

I am using VS2010 with IVF XE 2013

I have just transferred a Windows Project from a PC with Windows 8 to another PC with  Windows 7, and I tried to compile and rebuild the Project.

The files are compiled, however, linking fails with the Message:

Error 117  fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt LINK 
 

How can I solve  this problem?

Regards,

Reidar

0 Kudos
1 Solution
Lorri_M_Intel
Employee
2,113 Views
I'm not Steve, but ... I did take a look at the log. If you go to your project property page, to Fortran->Libraries, you'll see that you have "Intel Math Kernel Libraries" set to "Sequential". If you really are not using MKL then set this to No. The compiler embeds linker-instructions into the object code to automatically bring in the library at link time. And, because you also specified /iface:cvf, it requests the STDCALL version of the library, or mkl_intel_s.lib. You will have to do a clean-rebuild in order to purge all the object files that contain the linker-instructions. hope this helps -- --Lorri

View solution in original post

0 Kudos
10 Replies
Steven_L_Intel1
Employee
2,113 Views

See http://support2.microsoft.com/kb/2757355  You need to install Service Pack 1 for VS2010 on the new system. You'll then need to run a .msi file we provide - you'll get a message about it the next time you start VS2010.

0 Kudos
reidar
New User
2,113 Views

The problem I reported is with Win7.  I tried to install the VS1010 SP1, but this failed and I got the message that SP1 must be installed first!! So my walk-around was to remove VS2010 and install VS2013. I then installed IVF2013 and the IMSL libraries.

Everything OK until I want to link the program, then I get the message:

Error 1  fatal error LNK1104: cannot open file 'mkl_intel_s.lib' LINK

I do not make use of any  IMSL routine in this program, so why this message??

I modified the project as described in "Configuring for Use from the Microsift VS"

But no cure, only pain,  so far..

(Additionally: how to modify line-spacing ??)

Regards, Reidar


 

0 Kudos
Steven_L_Intel1
Employee
2,113 Views

That's a reference to MKL, not IMSL. Furthermore, it's a reference to the STDCALL interface MKL library which is not something you'd normally use from Intel Fortran and I think has been removed from the product. Do you build with the /iface:cvf option and call MKL routines?

0 Kudos
reidar
New User
2,113 Views

Thank you for your response Steve,

The project is a plain copy taken from my home PC on which I am using Win8 with VS2010 and IVF2013. This combination works OK.

On my brand new office PC with Win7 I initially installed VS2010, but was not able to install SP1, however VS2013 seems to have installed correctly and also IVF.   I therefore copied this project from my home PC to my office PC, but then I get this link error.

I nether do calls to MKL (as far as I know) or any other libraries...

Comilier is

Intel(R) Visual Fortran Compiler XE 14.0.1.139 [IA-32]

The linker command line looks like:

Th/OUT:"Debug/MultiPad.exe" /INCREMENTAL:NO /MANIFEST /MANIFESTFILE:"C:\TVA51-2C -April2014\TVA51-single-clas-2014-2C\Debug\MultiPad.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"Debug/MultiPad.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"C:\TVA51-2C -April2014\TVA51-single-clas-2014-2C\Debug\MultiPad.lib" version.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

The include  list (after removing a reference 'mkl' reference):

$(IFortInstallDir)compiler\include
$(IFortInstallDir)compiler\include\ia32
$(VCInstallDir)atlmfc\include
$(VCInstallDir)include
$(WindowsSdkDir)include\um
$(WindowsSdkDir)include\shared
$(FrameworkSDKDir)include
$(FNL_DIR)\IA32\include\dll

Library list:

$(IFortInstallDir)compiler\lib\ia32
$(VCInstallDir)atlmfc\lib
$(VCInstallDir)lib
$(WindowsSdkDir)lib\winv6.3\um\x86
$(FrameworkSDKDir)lib
$(FNL_DIR)\IA32\lib

But I get the same link error as before..

 

 

 

 

 

0 Kudos
mecej4
Honored Contributor III
2,113 Views

I neither do calls to MKL (as far as I know) or any other libraries.

Two comments about this, raising questions about dependencies. If you do not use MKL or IMSL, why do your include paths and library paths have entries containing $(FNL_DIR)? Have you checked whether you have INCLUDE directives in your sources that are no longer needed? Removing them will facilitate the build, but their presence may pull in IMSL and/or MKL.

0 Kudos
reidar
New User
2,113 Views

As I wrote, the project is copied from my home PC on which it compiles, links and runs well. I did not expect VS to change anything althoug the original is from VS2010, but same IVF version. The path entries you refer to were added by myself  as a trial fix. I have installed IMSL, so  it should not cause any problem, or?

0 Kudos
Steven_L_Intel1
Employee
2,113 Views

I would not expect a problem just by having IMSL in the path. Set the project property Linker > General > Show Progress to "Show some progress messages". Do a link and post the build output here.

0 Kudos
reidar
New User
2,113 Views

Hi Steve,

Attached most recent build log..

0 Kudos
Lorri_M_Intel
Employee
2,114 Views
I'm not Steve, but ... I did take a look at the log. If you go to your project property page, to Fortran->Libraries, you'll see that you have "Intel Math Kernel Libraries" set to "Sequential". If you really are not using MKL then set this to No. The compiler embeds linker-instructions into the object code to automatically bring in the library at link time. And, because you also specified /iface:cvf, it requests the STDCALL version of the library, or mkl_intel_s.lib. You will have to do a clean-rebuild in order to purge all the object files that contain the linker-instructions. hope this helps -- --Lorri
0 Kudos
reidar
New User
2,113 Views

Hi Lorri,

Yes, that really solved the problem.

Thanks and regards,

Reidar

 

0 Kudos
Reply