码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu系统下,gsl 库链接问题 -undefined reference to `cblas_xxx`

时间:2016-07-05 19:01:00      阅读:573      评论:0      收藏:0      [点我收藏+]

标签:

  今天在ubuntu系统下进行程序调试的时候出现以下错误信息:

[ 10%] Linking CXX executable ../test_coco
/usr/local/lib/libgsl.so: undefined reference to `cblas_ztrsv/usr/local/lib/libgsl.so: undefined reference to `cblas_scasum/usr/local/lib/libgsl.so: undefined reference to `cblas_izamax/usr/local/lib/libgsl.so: undefined reference to `cblas_dnrm2/usr/local/lib/libgsl.so: undefined reference to `cblas_zdotc_sub
collect2: error: ld returned 1 exit status
make[2]: *** [test_coco] Error 1
make[1]: *** [src/CMakeFiles/test_coco.dir/all] Error 2
make: *** [all] Error 2

  可以看出,之前的编译都没有问题,在最后的链接阶段出现错误,根据提示可知,libgsl库链接相关文件的时候出现问题。libgsl库依赖clbas库中的相关文件。所以在链接gls后还需加上对gslcblas的链接,问题解决!

ubuntu系统下,gsl 库链接问题 -undefined reference to `cblas_xxx`

标签:

原文地址:http://www.cnblogs.com/bozhicheng/p/5644582.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!