0fnt
0fnt

Reputation: 8681

Unable to link Intel MKL

I'm unable to link my program correctly. I use the following command line, but get an error.

g++ -I/home/blah/intel/composerxe/mkl/include dotProduct.cpp /home/blah/intel/composerxe/mkl/lib/intel64/libmkl_core.a

The output is this:

/tmp/ccvw6w13.o: In function `main':
dotProduct.cpp:(.text+0x108): undefined reference to `cblas_sdot'
collect2: ld returned 1 exit status

I also tried running a script that tries to link one by one against all .a files, but they all fail. Can anybody please suggest a solution. Thanks.

Upvotes: 1

Views: 3530

Answers (1)

ev-br
ev-br

Reputation: 26100

Here's a KB article from Intel:

http://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-for-linux-linking-applications-with-intel-mkl-version-100/

On a side note, if you can use Intel compiler instead of gcc, this works (at least it does for me):

icpc files -mkl

Notice there's no l in front, it's just -mkl.

Upvotes: 1

Related Questions