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

I got the an error LNK2019, imsls_err.lib(flexlm.obj) when I compiling the DLL below

zlzgj
Beginner
1,050 Views
Igot the an error LNK2019, imsls_err.lib(flexlm.obj)

error LNK2019: imsls_err.lib(flexlm.obj)
error LNK2019: imsls_err.lib(flexlm.obj)
error LNK2019: imsls_err.lib(flexlm.obj)
error LNK2019: imsls_err.lib(flexlm.obj)
error LNK2019: imsls_err.lib(flexlm.obj)
error LNK2019: imsls_err.lib(flexlm.obj)
error LNK2019: imsls_err.lib(flexlm.obj)

when compiling a Dynamic Library below, Ihave any idea for this, please give me an answer. thank you very much!


module MM
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
include 'link_fnl_static_hpc.h'
USE numerical_libraries
real:: A(2),B(2), INV(2,2)
END MODULE MM
!
!
MODULE FF
INTERFACE
subroutine Dis
Use MM
end subroutine Dis
END INTERFACE
END MODULE FF
!
!
subroutine MainSub(AA,BB)
!dec$ attributes dllexport :: MainSub
Use MM
use FF
real:: AA(2),BB(2)
A=AA
B=BB
call Dis
end subroutine MainSub
!
!
subroutine Dis
Use MM
implicit none
real :: C
INV=reshape((/1.0,0.0,0.0,2.0/),(/2,2/))
C=BLINF(2, 2, INV, 2,A, B)
print*,C
end subroutine Dis
0 Kudos
6 Replies
mecej4
Honored Contributor III
1,050 Views
You need to provide more information if you expect to receive help here. For instance, we need to know the compiler version, your OS, the version of IMSL used, the compiler and linker commands used, etc.

With IVF 11.1.070 - X64, IMSL FNL6 - X64, on Win7 Home X64, with a standard setup of the environmental variables, the above code, put into a file called dimsl.f90, and compiled using

[bash]D:LANG>ifort /LD %F90FLAGS% dimsl.f90 %LINK_FNL_SHARED%
Creating library dimsl.lib and object dimsl.exp[/bash]
produces dimsl.dll with no problems or error messages.
0 Kudos
zlzgj
Beginner
1,050 Views
mecej4:
thanks you for your help, My compiler is : IVF 11.1.051, VS 2008, IMSL6.0, I compiling the codes under VS2008 .Iam notfamiliar withcommand line.would you mindanswer me again.thanks you very much.
zlzgj
0 Kudos
mecej4
Honored Contributor III
1,050 Views
I do not have a version of IMSL that was bundled with IFort; therefore, if you have a bundled IMSL, there may be a VS2008 option for IMSL that you just select.

Choose a Fortran DLL project. Add your source file.

To Project:Properties:Fortran:General:Additional Include Directories, add the Include directory of your IMSL installation. For example, c:\LANG\vni\imsl\fnl600\Intel64\include\dll

To Project:Properties:Linker:General:Additional Library Directories, add the Lib directory of IMSL; for example, c:\LANG\vni\imsl\fnl600\Intel64\lib

To Project:Properties:Linker:Command Line:Additional Options, add the following (or as appropriate): imsl_dll.lib imsls_err.lib lmgr.lib

Build.
0 Kudos
Steven_L_Intel1
Employee
1,050 Views
ztzgj,

You are not using the IMSL provided by Intel. Please contact Visual Numerics for assistance with that version. How can I tell? The reference to flexlm.obj, which is not in the Intel variants.

0 Kudos
zlzgj
Beginner
1,050 Views
Hi, mecej4

According to what you said, I did it. thanks!

zlzgj
0 Kudos
zlzgj
Beginner
1,050 Views

steve Lionel

The problem has been solved. thanks for your help.

zlzgj

0 Kudos
Reply