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

IMSL library: unresolved external

Raimond_Dallmann
Beginner
1,470 Views

I migrated successfully from Compaq to Intel, but now I'm in trouble migrating an existing program with the use of IMSL, which gives me a linker error that the called subroutine is an unresolved external symbol. The message is:

error LNK2019: unresolved external symbol "_UMACH" in function "_SMAT". SMAT.obj

I followed the instruction in
http://software.intel.com/en-us/articles/installing-and-using-the-imsl-libraries/
but no success.

Thanks for any help

0 Kudos
1 Solution
Steven_L_Intel1
Employee
1,470 Views
My guess is that you have the calling convention set as CVF and are not USEing NUMERICAL_LIBRARIES in the routine that calls these. Either set the calling convention to Default (Properties > Fortran > External Procedures) or add USE NUMERICAL_LIBRARIES where IMSL routines are called.

View solution in original post

0 Kudos
12 Replies
mecej4
Honored Contributor III
1,470 Views
Please state which versions of Intel Fortran and IMSL were used, and the version of Windows, in particular 32 or 64 bit, because name decorations vary.

If you state the compilation/linking command lines, that would help. If you use the IDE, instead, there is a long list of options that affect the compilation, and if you set any of them to non-default values, those would be needed to be known, as well.
0 Kudos
Steven_L_Intel1
Employee
1,470 Views
Did you add the lines:

INCLUDE 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'

to one of your sources?
0 Kudos
Raimond_Dallmann
Beginner
1,470 Views
I use windows 7, 32 bit, Intel Fortran Professional Edition 11.1 with MVS 2008, IMSL 6.0

Here are the compilation/linking command lines taken from the IDE:

/nologo /debug:full /Od /Qsave /iface:cvf /module:"Debug/" /object:"Debug/" /traceback /check:bounds /libs:static /threads /dbglibs /winapp /c

/OUT:"Debug/ra2d.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files\VNI\imsl\fnl600\IA32\lib" /MANIFEST /MANIFESTFILE:"C:\Users\Raimond\Eigene Programme - Intel\WGV\Debug\ra2d.exe.intermediate.manifest" /DEBUG /PDB:"Debug/ra2d.pdb" /SUBSYSTEM:WINDOWS version.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

Thank you in advance for any further help

Raimond
0 Kudos
Steven_L_Intel1
Employee
1,470 Views
See my earlier reply.
0 Kudos
Raimond_Dallmann
Beginner
1,470 Views
Steve, I just added the lines, now the IMSL-subroutine Umach is not longer unresolved external but 2 remain: "_DGVCSP@32" and "_DWRRRN@28"

Raimond



0 Kudos
Steven_L_Intel1
Employee
1,471 Views
My guess is that you have the calling convention set as CVF and are not USEing NUMERICAL_LIBRARIES in the routine that calls these. Either set the calling convention to Default (Properties > Fortran > External Procedures) or add USE NUMERICAL_LIBRARIES where IMSL routines are called.
0 Kudos
mecej4
Honored Contributor III
1,470 Views
That problem can be solved by removing the incompatible option "/iface:cvf", as Steve stated.
0 Kudos
Raimond_Dallmann
Beginner
1,470 Views
You are completly right! I used "IMSL_LIBRARIES" instead of "NUMERICAL_LIBRARIES"
Now everything works fine. Thank you so much!
0 Kudos
Steven_L_Intel1
Employee
1,470 Views
Glad to hear it. IMSL_LIBRARIES is for when you are using the newer "Fortran 90" interfaces to the IMSL routines, though if you do that I recommend using the individual xxx_INT modules instead. If you use these, you have to change your calls to match the documented "Fortran 90" interface. Or, leave your code alone and use NUMERICAL_LIBRARIES.
0 Kudos
javier_b_1
Beginner
1,470 Views
I tried this but is not working. Got the following error ifort /nologo /debug:full /Od /warn:interfaces /module:"x64\Debug\\" /object:"x64\Debug\\" /Fd"x64\Debug\vc100.pdb" /traceback /check:bounds /libs:static /threads /dbglibs /winapp /4Yportlib /Qmkl:parallel /libdir:noauto /libdir:nouser /c /Qvc10 /Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Intel Fortran\Microsoft Files\VC\\bin\amd64" "C:\javier\Dropbox\intel\try.f90" C:\javier\Dropbox\intel\try.f90(2): error #5102: Cannot open include file 'link_fnl_dll.h' include 'link_fnl_dll.h'
0 Kudos
mecej4
Honored Contributor III
1,470 Views
The references to x64 and amd64 in the compiler invocation indicate that you are attempting to compile a 64-bit application. Earlier you stated that you have a 32-bit version of the IMSL libraries. This discrepancy needs to be resolved.
0 Kudos
Steven_L_Intel1
Employee
1,470 Views
You need to make sure that you have Visual Studio configured for using IMSL - the compiler can't find the include file. See http://software.intel.com/en-us/articles/installing-and-using-the-imsl-libraries/ for the details.
0 Kudos
Reply