The following error message appears when the program is being debugged under Ubuntu system today:
[Ten%]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] Error1 Make[1]: * * * [Src/cmakefiles/test_coco.dir/ALL] Error2 Make: * * * [ALL] Error2
As can be seen, the previous compilation is not a problem, in the last link stage error, according to the hint, LIBGSL library link related files when there is a problem. The LIBGSL library relies on related files in the Clbas library. So after the link GLS also need to add to the Gslcblas link, problem solving!
Ubuntu system, GSL Library link problem-undefined reference to ' cblas_xxx '