Question

I am trying to run a sample file from Intel on using its mkl software with C++. However, I am unable to get it to run. As I have never used C++, I assume I am making a simple error.

Here is the Intel document instructions I followed along with the sample code. It starts on page 11.

I am running this in my terminal:

g++ -m64 -I/opt/intel/composer_xe_2013.5.198/mkl/include dgemm_example.c

And this is my error:

Undefined symbols for architecture x86_64:
  "_MKL_free", referenced from:
      _main in cc9RJYcW.o
  "_MKL_malloc", referenced from:
      _main in cc9RJYcW.o
  "_cblas_dgemm", referenced from:
      _main in cc9RJYcW.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

I should note I am running this on my mid-2012 macbook retina.

Was it helpful?

Solution

Obviously you did not add MKL libraries

Try add

-L/path/to/MKL/libguide.so -L...

This website might help you more or less

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top