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

oneAPI Fortran Build 2022 with VS2019. '/LINK' problem.

KKA
Beginner
815 Views

The compile goes cleanly but the following messages are issued when compilation is completed:

ifort: command line warning #10006: ignoring unknown option '/LINK'

ifort: command line warning #10161: unrecognized source type 'static'; object file assumed.

ifort: error #10273: Fatal error in C:\PROGRA~2\Intel\oneAPI .........\bin\intel64\fortcom, terminated by 0xffffffd6.

 

The procedure will continues recompiling, issuing the first 2 ifort warning lines  above ('/LINK', and 'static'). Generating a ^C stops the compilation and the third ifort line is output. A series of DOS "Terminate the Batch job (Y/N)" responses must then be answered until a normal DOS command is reached.

 

Any suggestions for resolving this issue? 

Thanks,

Dennis

 

Labels (1)
0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
776 Views

As Jim says, the /link option is case-sensitve. What this does is tell the ifort driver that all options to the right of it are to be passed to the linker, not the compiler. Just the word "static" after /link is incorrect. If you want to force linking to the non-shared libraries, use /static as a compiler (not linker) option.

There would not be anything Intel installed that would add that "static". 

View solution in original post

0 Kudos
6 Replies
jimdempseyatthecove
Honored Contributor III
807 Views

The option switches are case sensitive.

/link is the proper switch, not /LINK

 

The error related to 'static' may be related to misuse of /LINK or possibly missing a ':' on /libs:static

Jim Dempsey

0 Kudos
KKA
Beginner
802 Views

I invoked the oneAPI 64 bit DOS window and issued the following command:

ifort /Qopenmp /Qparallel /Qmkl /O3 HFE_118.f

 

ifort used to compile and link as expected, but after reinstallation of oneAPI and VS2019, the output of the '/LINK' and 'static' warnings occur without producing an executable.

Thanks

0 Kudos
KKA
Beginner
786 Views

Looking more closely at the DOS window (PNG attached) I noticed that a second ifort instance was initiated using an old BAT file that I had deleted.  The first ifort did not create an executable.  Please see the attached PNG file. I have not been able to locate any files with the second ifort command having the "/LINK static" option. Is there any possibility of the "/LINK static" command line being hidden within the Intel folder?

Thanks 

Dennis

0 Kudos
Steve_Lionel
Honored Contributor III
777 Views

As Jim says, the /link option is case-sensitve. What this does is tell the ifort driver that all options to the right of it are to be passed to the linker, not the compiler. Just the word "static" after /link is incorrect. If you want to force linking to the non-shared libraries, use /static as a compiler (not linker) option.

There would not be anything Intel installed that would add that "static". 

0 Kudos
KKA
Beginner
772 Views

Thanks Steve,

I had the compile/link working properly a few weeks back. After I completed a repair on oneAPI and VS2019, any new attempts at compiling/linking invoke a bad batch file I had deleted which contained the invalid "/LINK static" code shown in the attached PNG file from my previous post. I cannot locate any source files with the "/LINK static" coding, which starts automatically after the first compilation is completed.

I only issued the command "ifort /Qopenmp /Qparallel /Qmkl /O3 HFE_118.f"

and the second "ifort" (shown on the PNG) starts automatically without the first compile/link generating an OBJ or EXE file.

 

I am totally confused how the "LINK static" command line is initiated, not once, but repeatedly with no intervention. I have to do a ^C to terminate the repeated compilations.

Thanks

Dennis

0 Kudos
KKA
Beginner
696 Views

Thanks Jim & Steve

I was not aware that the switches were cases sensitive. I finally found the problem -- I had a batch file named LINK.BAT which the compiler was reading after each compile and kept cycling forever.

 

Dennis

 

0 Kudos
Reply