Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

problem with mkl95_lapack and geev

Chang2
Beginner
1,424 Views

I am a newbie in fortran and visual studio. I ran into a problem when trying to use the geev subroutine with "use mkl95_lapack, only: geev". I followed the Intel MKL user's guide to compile an example code -- geev.f90 and went through all the steps on page 84-85 (running an intel mkl example in visual studio 2008 IDE). I include lapack.f90 in the header files, which I think should be enough? But I got the following errors when I tried to build the solution:

Error 1 error LNK2019: unresolved external symbol _SGEEV_MKL95 referenced in function _MAIN__ geev.obj

Error 2 error LNK2019: unresolved external symbol _CGEEV_MKL95 referenced in function _MAIN__ geev.obj

I don't know what happened. Hope someone can help me out...and sorry if I used some wrong terminology...

0 Kudos
6 Replies
DavidWhite
Valued Contributor II
1,424 Views
I guess that GEEV is the generic entry point. The missing symbols probably refer to the single and complex variable types. You should add these to the USE statement. Regards, David
0 Kudos
Chang2
Beginner
1,424 Views
Hi David, thanks for your reply. Can you give more details on how to add them in the USE statement? Because I am using the example code , I guess there shouldn't be any error inside
0 Kudos
DavidWhite
Valued Contributor II
1,424 Views
Chang, Try removing everything on the use statement to the right and including the ",". One way of doing this is adding ! and a space before the ",", making the "only" part of the statment a comment If this works, then you will know that everything is in that module that you need. If the definitions are still missing, then there is another module that needs to be "use"d so check the documentation to see what that is. Regards, David
0 Kudos
IanH
Honored Contributor III
1,424 Views
This looks more like a "missing library in the link stage" sort of error. In the Fortran project, have you got the property Fortran > Libraries > Use Intel Math Kernel Library set to something appropriate?
0 Kudos
IanH
Honored Contributor III
1,424 Views
(ignore - accidental duplicate. @#@! zero sized object error...)
0 Kudos
Chang2
Beginner
1,424 Views
Thanks IanH. I did missed one library. I found one post in a forum which says I need to add mkl_lapack95.lib. Then everything works well!
0 Kudos
Reply