Showing results for 
Search instead for 
Did you mean: 

why undefined reference to ??

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
Black Belt

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:


0 Kudos