- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am getting linking error in subject while compiling my fortran file with OneAPI ifort compiler 2022.1.0 located at oneAPI/compiler/2022.1.0/windows/bin/intel64/ifort.exe. My fortran subroutine does not have any call to said pow2o3 still I get this error. Any idea on how to get around it? Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since you did not show the source code and did not list the compiler options used, not much can be said. The missing external symbol is probably one of the myriad MKL routines that may be called by the compiler when it sees an expression such as x**(2.0/3.0). You can locate the object file that contains the reference to pow2o3 by using the additional option /link /map.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fortran compiler may generate such call for some math expression. Normally the needed libs will be automatically linked by the compiler. I saw you listed the full path of "ifort.exe" in the post. Did you invoke the compiler "ifort.exe" command by following the option 1 at https://www.intel.com/content/www/us/en/develop/documentation/get-started-with-fortran-compiler/top/get-started-on-windows.html? The compiler command prompt window will have all required compiler environment set up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you @mecej4 and @Xiaoping_D_Intel for your responses. I now see that the said symbol is in libm.lib.
>>dumpbin /symbols C:/PROGRA~2/Intel/oneAPI/compiler/2022.1.0/windows/compiler/lib/intel64/libm.lib | grep pow2o3
Yes, I am using option 1 to compile my code. I now ran setvars.bat in my shell and added ifort directory to system path. My shell now sees ifort. The shell prompt now looks like below:
But, I am now getting another error while compiling and linking my code in debug mode for my abc_stubs.cxx (empty functions) file:
abc_stubs.obj : fatal error LNK1223: invalid or corrupt file: file contains invalid .pdata contributions
Any idea how to resolve this debug mode issue?
Note: This link error goes away if I compile and link with O2 and my build succeed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like ICL LINK.exe does not like empty stub files in debug builds
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page