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

Unresolved ___intel_f2int on release compiles after switching to 10.0

van_der_merwe__ben
New Contributor II
766 Views
Hi,

If you google it, there are several posts about this topic: After switching from Intel Fortran 9.1 to 10.0.027 we started getting an unresolved external ___intel_f2int when linking some release DLLs. Debug DLLs do not give the error.

Lionel has suggested in another post about this subject that you should check your library path to make sure you are not still linking in against 9.1. This seems to be the general cause of this. In our case we checked using the /verbose link option and all the Fortran paths were to 10.0, but we still got this error.

We use our own make files and since we support multiple compilers and mix different languages, we explicitly state against which compiler libraries we want to link.

So I used dumpbin in the Intel library directory to try and find out which library was missing and after some trial and error, it seems that the culprit LIB file that you need is libircmt.lib (maybe libirc.lib if you are using single threaded I guess).

So we added this lib to our list of library files and the unresolved error went away.

Oddly enough dumpbin says that intel_f2int is an export from several libraries including this one...
0 Kudos
4 Replies
TimP
Honored Contributor III
766 Views
Yes, this function was added subsequent to 9.1 and is invoked frequently by 10.0 compilations. I seem to recall cases with 9.0 where libirc was required but had to be added explicitly, even when linking with ifort. Apparently, it was not always needed, but I believe ifort 9.1 included it "just in case."
0 Kudos
triala
Beginner
766 Views

Is there any news on this i just tried 10.1.019 and my Win32 Release version gets this unsatisfied ref ___intel f2int but my Win32 Debug version works flawlessly

I have disabled Optimisation on my Win32 Release version and It now links ok so is some weird optimizer thing

Admitedly I am not using the fortran to link the program as the fortran bits are just subroutines compiled into a library.lib linked into my .net program

I tried linking with the libirc library but made no difference

Please someone reply :(

0 Kudos
TimP
Honored Contributor III
766 Views
My installation of ifort 10.1.019 32-bit shows ___intel_f2int defined in libirc.lib and libircmt.lib. It may be that these are needed only by optimized Fortran compilations, or at least not by debug builds with x87 code only.
0 Kudos
triala
Beginner
766 Views

Thanks for the reply Tim8,

I finaly found out using linker /Verbose that a third party gfx vendor was supplyign old 9.1 .libs (including libirc.lib) and these were in the link path i removed them and used your libirc.lib suggestion and i can now link with optimization again.

Many thanks for the ideas

0 Kudos
Reply