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

Cannot find "link" despite having installed Desktop C++ environment as indicated

Feng__Jesse
New Contributor II
390 Views

I have installed the OneAPI package many times now, but this is the first time that this happened.

 

I installed Visual Studio Community 2022 (then tried 2019). I made sure to install the Desktop C++ environment.

I installed OneAPI basic.

I installed OneAPI HPC.

 

I added the path of ifort to system path.

 

I am able to initiate ifort compilation, but at the end of compiling, I get "ifort: error #10037: could not find 'link'"

 

I am able to compile and run Fortran codes in the Intel Fortran CMD.

 

I found that in Visual Studio when compiling, I must set Linker -> System -> Console subsystem. I never had to do this before. Changing to console allowed Visual Studio to compile and run the code.

 

All of the questions I found that asked about this, the answer has been: install Desktop C++ environment. Which I did, as I described above. And it is conditionally allowing me to compile Fortran.

 

I would like to not need to change the subsystem to console, or have a way to automatically change it, if this is necessary and somehow my installation on this machine has it on the wrong subsystem by default.

 

I would also like to be able to run Abaqus with Intel Fortran compiler. Previously, when I just had the issue of not able to call ifort in system CMD, I could still run Abaqus successfully via the Intel Fortran CMD, but I am not able to do so with the linker problem.

 

Any suggestions are welcomed. Thanks!

 

Jesse

 

PS: Some more information: When running Abaqus info=system, it shows that it is not able to find a version of C++ compiler. This part is supposed to be addressed by installing the Desktop C++ development kit, but isn't.

 

PPS: Just found another information: In my previous machine, after these installations, I can only successfully compile with the x64 compiler. But on this machine, I can only successfully compile with x86 compiler. Attempting to compile with x64 returns a lot of variable type mismatch errors.

 

PPPS: It has been bugging me for a while, but now I start to think seriously that this might be the core problem. In every part of my installations, I have never specified the system type. The installer should have detected that it is x64. However, only the x86 compiler work properly in Visual Studio, while the Intel Fortran 64 CMD works and 32 CMD returns error saying 32/64 incompatible.

When I call just "ifort", I see the following: Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on IA-32, Version 2021.8.0. Shouldn't that say 64 Compiler for applications on IA-64?

Related to this problem: When I followed the instructions  in the pinned thread on connecting Abaqus to OneAPI. I added the line @call "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat" intel64 vs2019

When I do this and check Abaqus's system information, I see that it does not see a linker or a C++ compiler.

But when I change it to @call "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat" intel32 vs2019

Abaqus system information can see a "Microsoft (R) Incremental Linker Version 14.29.30148.0" and a C++ compiler: "Microsoft Visual C++ 14.29.30148.0".

0 Kudos
2 Replies
Steve_Lionel
Honored Contributor III
354 Views

This seems a duplicate of your https://community.intel.com/t5/Intel-Fortran-Compiler/x64-x32-compiler-issue/td-p/1456317/

When Intel Fortran installs, you get an ifort that target both 32-bit and 64-bit platforms. (ifx is 64-bit only). In both cases, the compiler itself runs in a 64-bit environment.

0 Kudos
Feng__Jesse
New Contributor II
350 Views

This was my first post. I made many edits throughout the day as I tried many solutions I found online. But the problem persists. The many edits got automatically flagged as spam, so I decided to write another post with a more trimmed down version of my issue. But the second post was instantly flagged as spam too. I messaged forum mod to restore the newer post, but he restored both and I don't have the ability to delete posts.

0 Kudos
Reply