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

PARDISO linking in a c++ project

Jae_Young_L_
Beginner
342 Views

I have been using MKL PARDISO in C language projects for many years.  I works nicely.  Recently, I tried to include PARDISO in C++ project.  But it does not work.  The linker gives a message that PARDISO and omp_get_max_threads are undefined symbols."  I included the following libraries: MKL_C, MKL_IA32, MKL_lapack, MKL_solver and libguide40.  What am I missing?

0 Kudos
2 Replies
Ying_H_Intel
Employee
342 Views

Hi Jae Young,

Do you have the clause like #include "mkl.h"   in your c++ file?  The extern "C" claim are needed when C++ call C function.  For example, in mkl_pardiso.h

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

_Mkl_Api(void,PARDISO,(
 _MKL_DSS_HANDLE_t,   _INTEGER_t *,     _INTEGER_t *,
 _INTEGER_t *,           _INTEGER_t *,     _INTEGER_t *,
 void *,  _INTEGER_t *,     _INTEGER_t *,
 _INTEGER_t *,           _INTEGER_t *,     _INTEGER_t *,
 _INTEGER_t *,           void *, void *,
   _INTEGER_t *))

#ifdef __cplusplus
}
#endif /* __cplusplus */
 

(irrelevant to the topic, just comments:  i i noticed you are using mkl_c, libguide40, are you using some previous MKL version? Here is MKL 11.1.2 release noteshttp://software.intel.com/en-us/articles/intel-mkl-111-release-notes )

Best Regards,

Ying

0 Kudos
Jae_Young_L_
Beginner
342 Views

Dear Ying H,

Thank you very much for your valuable advice.  I resolve the problem by following your hint.

Best regards,

Jae Young Lee

0 Kudos
Reply