Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Link error 2019 accessing _DPOSV

Don_G_
New Contributor I
414 Views

I am converting a fortran dll library project from an earlier version of the Microsoft IDE to VS 2008 using Intel Fortran Version 10.0.3.24 and the corresponding MKL.   When the linker step of the project runs, I get missing routines:

1>MTXSOLVE.obj : error LNK2019: unresolved external symbol _DPOSV referenced in function MTXSOLVE
1>MTXSOLVE.obj : error LNK2001: unresolved external symbol _DSPTRF
1>MTXSOLVE.obj : error LNK2001: unresolved external symbol _DSPTRS
1>MTXSOLVE.obj : error LNK2001: unresolved external symbol _DPPSVDPOSV, 

I think these are LAPACK routines in the MKL.  I am building the IA32 version of the dll and I explicitly include the path to the ia23 MKL lib routines.  Where did I go wrong? Here is the linker command line.

/OUT:"Debug/Upid_Fortran.dll" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files\Intel\MKL\10.0.3.021\ia32\lib" /MANIFEST /MANIFESTFILE:"C:\Users\goldend\Documents\Development\UPID\trunk\UPID_Fortran\debug\upid_fortran.dll.intermediate.manifest" /DEBUG /PDB:"Debug/Upid_Fortran.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"Debug/Upid_Fortran.lib" /DLL kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

 

 

 

 

 

 

0 Kudos
6 Replies
mecej4
Honored Contributor III
414 Views

You told the linker where to find the MKL libraries by giving it the MKL library path, but you did not tell it what to include in the link: specifically, you should specify the MKL library that you want to link with.

The MKL link line advisor is a helpful tool for such purposes.

0 Kudos
Don_G_
New Contributor I
414 Views

So in which of the MKL libraries do these LAPACK routines  reside?

0 Kudos
Gennady_F_Intel
Moderator
414 Views

all versions of MKL contains these Lapack's routines. You may have a look ea an example in MKL 2017.  

0 Kudos
Don_G_
New Contributor I
414 Views

So...I added mkl_lapack.lib to my linker inputs and I ended up with this:  >ipo: warning #11023: file format not recognized for mkl_lapack.lib

 

0 Kudos
Gennady_F_Intel
Moderator
414 Views

mecej4 ( post#2) recommended to use MKL Linker Adviser - https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor. Could you check how to link and add all necessarily libs 

0 Kudos
Don_G_
New Contributor I
414 Views

Thanks -  the Linker Adviser worked.   Despite the fact that I could not figure out how to add the compiler options:    -I"%MKLROOT%"\include

0 Kudos
Reply