错误:_cspr_lp64_iface.c:(.text+0x28): undefined reference to `mkl_blas_cspr'类似未定义引用
2012-02-16 14:40
567 查看
1 编译出现
../../tmglib_LINUX.a linsrc_LINUX.a ../../libmkl_intel_lp64.a -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lm -lpthread -lifcore -o ../xlintimc
../../libmkl_intel_lp64.a(_cspr_lp64.o): In function `cspr_':
_cspr_lp64_iface.c:(.text+0x28): undefined reference to `mkl_blas_cspr'
make: *** [../xlintimc] 错误 1
是因为把mkllapack拷贝进入自己的lapack包里面引起的,改为使用
系统安装的lapack
/opt/intel/composerxe/mkl/lib/intel64/libmkl_intel_lp64.a
推测原因:1 是因为库引用之间存在相对路径,移过来后就找不到函数了
2 编译添加的库里面,库与库之间可能存在位置关系(与编译器有关),比如
A 库引用B,那么库A写在库B的前面
3 系统中有两个mkl库,注意不要混合使用(需要修改编译选项和环境变量LD_LIBRARYPATH使得编译程序所使用的函数均来自同一个库)。
注意不要缺失库,这需要阅读intel 提供的mkl手册,把库写全写对。
本例中其他库所引用的函数在lapack库中,故它写在后面;而它引用blas库,故blas库写在最后
../../tmglib_LINUX.a linsrc_LINUX.a ../../libmkl_intel_lp64.a -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lm -lpthread -lifcore -o ../xlintimc
../../libmkl_intel_lp64.a(_cspr_lp64.o): In function `cspr_':
_cspr_lp64_iface.c:(.text+0x28): undefined reference to `mkl_blas_cspr'
make: *** [../xlintimc] 错误 1
是因为把mkllapack拷贝进入自己的lapack包里面引起的,改为使用
系统安装的lapack
/opt/intel/composerxe/mkl/lib/intel64/libmkl_intel_lp64.a
推测原因:1 是因为库引用之间存在相对路径,移过来后就找不到函数了
2 编译添加的库里面,库与库之间可能存在位置关系(与编译器有关),比如
A 库引用B,那么库A写在库B的前面
3 系统中有两个mkl库,注意不要混合使用(需要修改编译选项和环境变量LD_LIBRARYPATH使得编译程序所使用的函数均来自同一个库)。
注意不要缺失库,这需要阅读intel 提供的mkl手册,把库写全写对。
本例中其他库所引用的函数在lapack库中,故它写在后面;而它引用blas库,故blas库写在最后
相关文章推荐
- 错误:_cspr_lp64_iface.c:(.text+0x28): undefined reference to `mkl_blas_cspr'类似未定义引用 *转载
- 错误:_cspr_lp64_iface.c:(.text+0x28): undefined reference to `mkl_blas_cspr'类似未定义引用
- 排查错误:undefined reference to `libmsvcrt_a_iname'
- Qt编译错误:undefinedreferenceto`vtable for 。。。。'的解决
- linux编译安装php5.4遇到错误:undefined reference to `libiconv_open'
- 编译Ralink SDK时碰到的奇怪错误(undefined reference to `main')的解决办法
- undefined reference to `clock_gettime' 链接错误问题解决(转)
- undefined reference to 'pthread_create' 错误
- gcc 编译错误:"undefined reference to 'sqrt'
- 链接错误 undefined reference to 'atexit'
- 移植uip-0.9到u-boot中出现undefined reference to `flash_info'错误的分析过程
- 交叉编译中出现的 'Undefined reference to __aeabi_read_tp' 错误
- undefined reference to `clock_gettime' 链接错误问题解决
- 出现undefined reference to `forkpty' 错误解决方法
- sqlite3 交叉编译 undefined reference to `fdatasync' 错误解决
- undefined reference to `clock_gettime' 链接错误问题解决
- 解决webrtc2sip编译出现错误undefined reference to symbol 'dlopen@@GLIBC_2.1'
- 解决QT多线程中undefined reference to 'pthread_create'的错误
- 编译器错误:/tmp/ccyOgqYQ.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status
- 编译错误----undefined reference to 'pthread_create'问题解决