Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Jae_Young_L_
Beginner
46 Views

PARDISO linking in a c++ project

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
46 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

Jae_Young_L_
Beginner
46 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