这是QT项目的配置:
unix {
INCLUDEPATH += /opt/intel/mkl/include
LIBS += -L/opt/intel/mkl/lib/intel64 \
-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_def \
-liomp5 -lpthread -ldl -lm
}
错误是
我已经链接了-lm
标志,为什么?
更新:
ubuntu@ubuntu-desktop:/opt/intel/mkl/tools$ ./mkl_link_tool -check_mkl_presence
Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.0
==========================================================
Unknown mode. Specify -libs, -opts, -env or compilation line
Configuration
=============
MKL version: 11.1
OS: lnx
Architecture: intel64
Compiler: intel_f
Linking: dynamic
Interface layer: lp64
Parallel: yes
OpenMP library: iomp5
ubuntu@ubuntu-desktop:/opt/intel/mkl/tools$ ./mkl_link_tool -check_mkl_presence -libs -opts -env
Intel(R) Math Kernel Library (Intel(R) MKL) Link Tool v4.0
==========================================================
Output
======
Compiler option(s):
-I/opt/intel/composer_xe_2013_sp1.0.080/mkl/include
Linking line:
-L/opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread -lm
Environment variable(s):
export LD_LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1.0.080/mkl/../compiler/lib/intel64:/opt/intel/composer_xe_2013_sp1.0.080/mkl/lib/intel64:$LD_LIBRARY_PATH;
ubuntu@ubuntu-desktop:/opt/intel/mkl/tools$
更新2:
ubuntu@ubuntu-desktop:/opt/intel/mkl/lib/intel64$ ldd libmkl_core.so
linux-vdso.so.1 => (0x00007fff2b589000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe268d8d000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe2689ce000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe26a50c000)
ubuntu@ubuntu-desktop:/opt/intel/mkl/lib/intel64$
我已经使用该ldd
命令查看 libmkl_core.so 需要哪些库,它没有显示 libm.so 或数学库。为什么在 Qt 创建者中,它显示undefined reference to 'logf'
?