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

Need help! Can you compile pardiso_unsym_complex_c.c on visual studio 2008?

worakanok
Beginner
504 Views
I have a problem compiling or linking pardiso on visual studio 2008 (C++). I don't know what went wrong so I tried on the example code "pardiso_unsym_complex_c.c" and got the same (as compiling my own code) error messages below. It worked fine for "pardiso_unsym_c.c". Did I miss any header file? I noticed that with or without mkl_pardiso.h I got the same error message. In addition, I linked mkl by right clicking on the project name then add Intal MKL, didn't do manually.

Please helpppp :(




1>test.obj : error LNK2028: unresolved token (0A00003C) "int __cdecl PARDISO(void *,int *,int *,int *,int *,int *,struct doublecomplex *,int *,int *,int *,int *,int *,int *,struct doublecomplex *,struct doublecomplex *,int *)" (?PARDISO@@$FYAHPAXPAH1111PAUdoublecomplex@@111111221@Z) referenced in function "public: __clrcall Test::Test(void)" (??0Test@@$FQ$AAM@XZ)

1>test.obj : error LNK2019: unresolved external symbol "int __cdecl PARDISO(void *,int *,int *,int *,int *,int *,struct doublecomplex *,int *,int *,int *,int *,int *,int *,struct doublecomplex *,struct doublecomplex *,int *)" (?PARDISO@@$FYAHPAXPAH1111PAUdoublecomplex@@111111221@Z) referenced in function "public: __clrcall Test::Test(void)" (??0Test@@$FQ$AAM@XZ)

0 Kudos
5 Replies
Gennady_F_Intel
Moderator
504 Views

Hi, worakanok

I think the followingKB articles will help you to find out how to create and link your application with the latest MKL's version.

The first KB article "Integrating a Microsoft Visual Studio* IDE Project with Intel MKL", This KB article provides of Microsoft Visual Studio* IDE projects with the library.

And the second article will helps you to select libraries you need for linking your application

--Gennady

0 Kudos
Gennady_F_Intel
Moderator
504 Views
As an additional help, I ve attached the mvcs 2005 project with pardiso_unsym_c.c example. You can convert it to 2008 and check how it will work.

--Gennady
0 Kudos
worakanokhotmail_com
504 Views

Hi, worakanok

I think the followingKB articles will help you to find out how to create and link your application with the latest MKL's version.

The first KB article "Integrating a Microsoft Visual Studio* IDE Project with Intel MKL", This KB article provides of Microsoft Visual Studio* IDE projects with the library.

And the second article will helps you to select libraries you need for linking your application

--Gennady


Well thank you for your reply. However, my problem was not linking MKL with MVS. If you try to run the example "pardiso_unsym_complex_c.c" that came with your MKL, i'll see that it can't compile. I found out later from a help of my friend and google that in order for pardiso to work for complex number you need to cast _DOUBLE_COMPLEX_t to double or PARDISO will not recognize it. I am now having another problem that pardiso (complex) doesn't give me the right solution compared with that given by using real-number pardiso. Any suggestion?
0 Kudos
Gennady_F_Intel
Moderator
504 Views
It seems that you use *.cpp extention for this test.

Am I right? If yes, you can add

#include

And comment

//extern MKL_INT PARDISO

// (void *, MKL_INT *, MKL_INT *, MKL_INT *, MKL_INT *, MKL_INT *,

// double *, MKL_INT *, MKL_INT *, MKL_INT *, MKL_INT *, MKL_INT *,

// MKL_INT *, double *, double *, MKL_INT *);

( the example pardiso_unsym_c.c pardiso_unsym_c.cpp is attached).


--Gennady
0 Kudos
Gennady_F_Intel
Moderator
504 Views

Well thank you for your reply. However, my problem was not linking MKL with MVS. If you try to run the example "pardiso_unsym_complex_c.c" that came with your MKL, i'll see that it can't compile. I found out later from a help of my friend and google that in order for pardiso to work for complex number you need to cast _DOUBLE_COMPLEX_t to double or PARDISO will not recognize it.

I am now havinganother problem that pardiso (complex) doesn't give me the right solutioncompared with that given by using real-number pardiso. Anysuggestion?


Can you get the test case? ( Feel free to reply in Private if needed ).
--Gennady

0 Kudos
Reply