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

IMSL cannot be linked.

rabbitpig
Beginner
814 Views
When using DET fucntion in programm, there are link errors as follows:
matrix.obj : error LNK2001: unresolved external symbol __imp__MPIPRIV main.obj : error LNK2001: unresolved external symbol __imp__MPIPRIV Debug/Crrr.exe : fatal error LNK1120: 1 unresolved externals
All setup is correct becasue other IMSL subroutines can be used. who knows it ?
0 Kudos
4 Replies
Steven_L_Intel1
Employee
814 Views
This is due to a compiler bug. Until it is fixed, you can solve it by adding the following code to your application:


! Add this source to your project to correct the problem
! that, for a Debug build for certain projects using the
! IMSL Fortran libraries, the linker complains of an
! unresolved external symbol __imp__MPIPRIV
BLOCK DATA MPIPRIV_DEF
COMMON /MPIPRIV/ DUMMY
!DEC$ ATTRIBUTES ALIAS:"__imp__MPIPRIV" :: /MPIPRIV/
END BLOCK DATA MPIPRIV_DEF
0 Kudos
rabbitpig
Beginner
814 Views
yes . it is ok. thanks
0 Kudos
caliniaru
Beginner
814 Views
Hi Steve,

I get the above error on more than one file. The extension is *.f so the first complain is that when I add the sample code, the compiler does not recognize "BLOCK DATA" section. After changing the extension to *.f90, the compiler does not complain, but the linker still do. After several tries, I found that Full Debug Information Format is responsible for this. If I change to Line numbers only or to none, the linker does not complain. How can I get Full Debug Info and the linker happy? I am not a skilled Fortran coder, so please be more verbose.

Best regards,
Calin
0 Kudos
Steven_L_Intel1
Employee
814 Views
We fixed this problem a couple of updates ago. If you're using the current 9.0.030, you should not see it. The source I posted is free-form should be in a .f90 file.
0 Kudos
Reply