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

error LNK2019: unresolved external symbol _PARDISO referenced in function

ceo012
Beginner
1,054 Views
CPU : Intel Core 2
OS : Windows XP
Compiler : Intel Visual Fortran Prof. ed for Wind (Trial Version)
Environment : Visual Studio 2005 Professional ed.

I downloaded Visual Fortran compiler and compiled sample code from VS2005
However, thereare link errors as followings

1>Deleting intermediate files and output files for project 'Exam1', configuration 'Debug|Win32'.
1>Compiling with Intel Visual Fortran 11.0.072 [IA-32]...
1>Exam1.f90
1>Linking...
1>Exam1.obj : error LNK2019: unresolved external symbol _PARDISOINIT referenced in function _MAIN__
1>Exam1.obj : error LNK2019: unresolved external symbol _PARDISO referenced in function _MAIN__
1>Debug\Exam1.exe : fatal error LNK1120: 2 unresolved externals

I manually added the include and lib folers for the Intel Math Kernal Lib.
Visual Studio Tools> Options> Intel Fortran> Compilers dialog
$(IFortInstallDir)include\ia32
$(IFortInstallDir)include\intel64
$(IFortInstallDir)mkl\include

$(IFortInstallDir)mkl\ia32\lib
$(IFortInstallDir)mkl\em64t\lib
$(IFortInstallDir)mkl\include

What's the problem? Thank you for your time
0 Kudos
4 Replies
ArturGuzik
Valued Contributor I
1,054 Views
Quoting - ceo012
CPU : Intel Core 2
OS : Windows XP
Compiler : Intel Visual Fortran Prof. ed for Wind (Trial Version)
Environment : Visual Studio 2005 Professional ed.

I downloaded Visual Fortran compiler and compiled sample code from VS2005
However, thereare link errors as followings

1>Deleting intermediate files and output files for project 'Exam1', configuration 'Debug|Win32'.
1>Compiling with Intel Visual Fortran 11.0.072 [IA-32]...
1>Exam1.f90
1>Linking...
1>Exam1.obj : error LNK2019: unresolved external symbol _PARDISOINIT referenced in function _MAIN__
1>Exam1.obj : error LNK2019: unresolved external symbol _PARDISO referenced in function _MAIN__
1>DebugExam1.exe : fatal error LNK1120: 2 unresolved externals

I manually added the include and lib folers for the Intel Math Kernal Lib.
Visual Studio Tools> Options> Intel Fortran> Compilers dialog
$(IFortInstallDir)includeia32
$(IFortInstallDir)includeintel64
$(IFortInstallDir)mklinclude

$(IFortInstallDir)mklia32lib
$(IFortInstallDir)mklem64tlib
$(IFortInstallDir)mklinclude

What's the problem? Thank you for your time
Hi,

linker can't find the libraries referenced in the program, so you have unresoved externals. Adding include and lib folder to IDE environment is not enough. You need to specify the libraries to link in Project->Linker->Input->Additional Dependencies.

See the docs and Chapter 5 for examples and you can try to get a list using this link.

A.

0 Kudos
Gennady_F_Intel
Moderator
1,054 Views
as an additionally to the Artur response, please look at the KB article: Configuring Intel Fortran in Microsoft* Visual Studio* to build Intel MKL Applications __http://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-for-windows-build-intel-mkl-program-with-intel-fortran-in-microsoft-visual-studio/
-gif
0 Kudos
ceo012
Beginner
1,054 Views
as an additionally to the Artur response, please look at the KB article: Configuring Intel Fortran in Microsoft* Visual Studio* to build Intel MKL Applications __http://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-for-windows-build-intel-mkl-program-with-intel-fortran-in-microsoft-visual-studio/
-gif

Thank you so much for your reples. Yes, it works well. However, if I use LAPACK heev functionfrom VS 2005, which lib. do I add? Thanks
0 Kudos
ArturGuzik
Valued Contributor I
1,054 Views
Quoting - ceo012

Thank you so much for your reples. Yes, it works well. However, if I use LAPACK heev functionfrom VS 2005, which lib. do I add? Thanks

you're welcome.

For LAPACK you should add something like that:

mkl_lapack.lib mkl_core.lib mkl_intel_c.lib mkl_intel_thread.lib libiomp5md.lib

The first one is what you need, then the core lib, the next is the CDECL interface support and others for threading support.

From the example Intel pages (Gennady pointed to) you can, obviously, skip first two screens related to additional lib and include directories, as you set up this at a "global" IDE level. So just add the above to the linking line (as in the last screenshot of Intel example).


A.
0 Kudos
Reply