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

Linking problem for Fortran 95 call

varney
Beginner
537 Views
I am trying to link mkl version 8.0.2 with a program using lapack95 spev. I've tried using:

ifort -L/opt/intel/mkl/8.0.2/lib/32/ -lmkl_lapack95 -lmkl_lapack -lmkl_ia32 -lguide -lpthread hw02p03.f90

I obtain the following error:

/tmp/ifortfTlvvR.o(.text+0x134): In function `MAIN__':
: undefined reference to `spev_'

Clearly, there's something wrong with how I'm linking this. Could I please get an explanation for the proper way to link to the library when I compile?

Chris
0 Kudos
1 Reply
envog
Beginner
537 Views
1) find the location where the interfaces are stored. usually it is a directory named include inside the intel directory

2) compile all f90 files in order to produce the necessary modules

3) when compiling your application use the -I switch pointing to the include directory where the modules are

Evans
0 Kudos
Reply