无法链接英特尔MKL

问题描述:

我无法正确链接我的程序。我使用以下命令行,但出现错误。无法链接英特尔MKL

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

输出是这样的:

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

我也试着运行试图通过一个针对所有.a文件链接一个脚本,但他们都失败。任何人都可以请建议一个解决方案。 谢谢。

下面是英特尔知识库文章:

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

在一个侧面说明,如果你可以使用英特尔编译器,而不是GCC的,这个工程(至少它确实对我来说):

ICPC 文件 -mkl

通知没有在前面,它只是-mkl。