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

why undefined reference to ??

Tai_Q_
Beginner
409 Views

I am now writing a makefile for a code not written by me. It uses 'MKL'. But the difficult part for me is that I do not know which 'lib' to include.

Now when I try to generate a executable file, errors  are:

undefined reference to XXX

I know I do not link the correct MKL lib to the code since I do not know subroutine is include in  which lib.

What should I do? I do not want to link all the 'lib' files in $(MKLROOT)/lib.

 

 

 

 

0 Kudos
1 Reply
mecej4
Honored Contributor III
409 Views

For situations where simple calls to MKL suffice, simply use the -mkl option when compiling and linking. If you wish to use BLAS95/Lapack95, or you wish to build multi-threaded applications, use the MKL Link Line Advisor tool:

     https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor

 

0 Kudos
Reply