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

linking mkl with VS 2010

Michal_Z_
Beginner
1,139 Views

Hello, I have a problem linking the mkl libraries with my program in FORTRAN. I am using the Intel Parallel Studio XE 2011 with VS 2010. The program is simple (see the code below):

Program SC
    USE mkl95_lapack
    implicit none
    double precision  Ht(2,2), ebb(2)
    integer info
   
    Ht(1,2)=0.50D+00
    Ht(2,1)=0.0D+00
    Ht(1,1)=0.50D+00
    Ht(2,2)=1.50D+00
  
    call syevd(Ht, ebb, 'N', 'U', info)
    write(*,*) info
    write(*,*) ebb(1), ebb(2)
end

I've read that to link tke mkl (when usin the Intel Compiler integated with VS 2010) one has to set    Project>Properties>Fortran>Libraries>Use Intel Math Kernel Library       to Parallel or Sequential. And so I did, but when I hit bulid an error occures:

error LNK2019:unresolved external symbol _DSYEVD_MKL95 refferenced in function _MAIN_

Can  anyone help?

PS Sorry if this is a basic, not interesting poroblem.

0 Kudos
3 Replies
Gennady_F_Intel
Moderator
1,139 Views
please look at the article "Creating, Configuring, and Running Intel® Visual FORTRAN projects in Microsoft* Visual Studio* to build Intel® MKL application" it should helps to see how you can builf application with fortran.f90.
0 Kudos
mecej4
Honored Contributor III
1,139 Views
You have to include mkl_lapack95.lib in the linking step. At the command line, do
ifort /Qmkl michal.f90 mkl_lapack95.lib.

Or, if usIng the IDE, add mkl_lapack95.lib as an additional library to use when linking.
0 Kudos
Michal_Z_
Beginner
1,139 Views
Hello, thank you for help. I've added the additional library mkl_lapack95.lib to the linker as you said mecej4 and it worked:) thanks again
0 Kudos
Reply