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

MKL link2019 error when using Release mode

S__MPay
Beginner
706 Views

When I compile my code using Debug mode it is build successfully but when I try the Release mode I get linking error.

I am using some MKL functions:

1>RBUS.obj : error LNK2019: unresolved external symbol DGETRF referenced in function CLASS_STIFFNESS_mp_STIFFNESS_INVERSEK
1>RBUS.obj : error LNK2019: unresolved external symbol DGETRI referenced in function CLASS_STIFFNESS_mp_STIFFNESS_INVERSEK
1>RBUS.obj : error LNK2019: unresolved external symbol DPOSV referenced in function MDLSOLVER_mp_MKLSYMSOL
1>RBUS.obj : error LNK2019: unresolved external symbol DGESV referenced in function MDLSOLVER_mp_MKLSOLVE
1>RBUS.obj : error LNK2019: unresolved external symbol DGETRS referenced in function MDLSOLVER_mp_MKLSOLVEFACT
1>x64\Release\RBUS.exe : fatal error LNK1120: 5 unresolved externals

I could not figure out why this is happening.

0 Kudos
1 Reply
S__MPay
Beginner
706 Views

I noticed that project properties for Debug mode and release mode are saved separately.

So I followed automatic linking procedure:

Project>[Project Name] Properties>Configuration Properties>Fortran>Libraries>Use Intel Math Kernel Library and select Parallel, Sequential, or Cluster as appropriate.

and this resolved the issue.

I hope someone will find this topic useful.

0 Kudos
Reply