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

LNK1117 error with IFX

Jon_D
New Contributor I
1,326 Views

Hello,

I am trying to compile several Fortran projects (several console projects and several DLL projects) using the latest IFX compiler. I am getting the following linker warnings and errors:

 

lld-link: warning: MS /GL object found in the command line.
lld-link: warning: Finalizing linking process with MS-LINK
LINK : warning LNK4044: unrecognized option '/mllvm:-mcpu=x86-64'; ignored
LINK : warning LNK4044: unrecognized option '/mllvm:-vector-library=SVML'; ignored
LINK : warning LNK4044: unrecognized option '/mllvm:-disable-hir-generate-mkl-call'; ignored
LINK : fatal error LNK1117: syntax error in option 'opt:fintel-libirc-allowed'
lld-link: error: ExecuteAndWait failed: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe @C:\Users\xxx\AppData\Local\Temp\lld-lto-8c8466.rsp

 

For console projects, I was able to get rid of this error by disabling the "Interprocedural Optimization" (original project used /Qipo). But this modification doesn't work with the DLL projects.

 

Has anybody run into this error? Any ideas how I might be able to fix the issue?

Thanks,

Jon

0 Kudos
4 Replies
Barbara_P_Intel
Employee
1,280 Views

Do you have a small reproducer you can upload?

 

0 Kudos
Ron_Green
Moderator
1,259 Views

From the output, you are using VS2019 correct?

If you are mixing DLLs and libraries built with the older Intel Fortran IFORT and Itnel C++ ICC make sure to disable IPO everywhere.  

When you say "But this modification doesn't work with the DLL projects" what error are you seeing?

Do you have any 32bit projects in your Solution? 

0 Kudos
Jon_D
New Contributor I
1,126 Views

Hello Ron,

I apologize being 2 months late for my reply. To answer your questions:

1. Yes, my DLL project relies on static libraries that were built with an older version of the IFORT compiler. Should I re-build these using the same IFX compiler? Non-DLL projects (console application) using the same libraries compile without any problems.

2. My solution does include both 64bit and 32bit versions of the same projects.

Thanks for any replies.

 

0 Kudos
Barbara_P_Intel
Employee
1,044 Views

What versions of ifx and ifort are you using? Do you know what version of ifort was used to create the .dlls?

You can mix and match .obj files and libraries between ifx and ifort, except for 2 cases. 

  1. When /Qipo is used for both compilers. The 2 compilers use completely different mechanisms for Intraprocedural Optimization. 
  2. ifx only creates 64-bit targets; /Qm32 is not recognized by ifx. If any of the .dlls built with ifort are 32-bit, they are not compatible.

ifx is the wave of the future.

 

0 Kudos
Reply