User forums > Using Code::Blocks
How to configure Lapack external libraries with C::B
asd34:
thanks for helping,
I deliberately followed the links you provided, putting IDE into verbose mode did helped me, but didn't solve the problem in overall.
I even tried to change the dependency in under the Project>Properties>Build Target>Dependencies without success.
Here is the verbose output.
gfortran.exe -LE:\TEST_FOLDER\lapack_lib -LE:\TEST_FOLDER\lapack_lib\ -LE:\TEST_FOLDER\lapack_lib\ -LE:\TEST_FOLDER\lapack_lib -LE:\TEST_FOLDER\lapack_lib\ -LE:\TEST_FOLDER\lapack_lib -o bin\Debug\Fort_empty.exe obj\Debug\main_fort.o E:\TEST_FOLDER\lapack_lib\blasd.lib E:\TEST_FOLDER\lapack_lib\extrasd.lib E:\TEST_FOLDER\lapack_lib\lapack.lib E:\TEST_FOLDER\lapack_lib\lapack.lib E:\TEST_FOLDER\lapack_lib\blas.lib E:\TEST_FOLDER\lapack_lib\blas.lib E:\TEST_FOLDER\lapack_lib\lapack.lib
obj\Debug\main_fort.o: In function `my':
.../CB Projects/Fort_empty/main_fort.f90:72: undefined reference to `dlansy_'
.../CB Projects/Fort_empty/main_fort.f90:73: undefined reference to `dlansy_'
.../CB Projects/Fort_empty/main_fort.f90:82: undefined reference to `dsygv_'
.../CB Projects/Fort_empty/main_fort.f90:104: undefined reference to `x04caf_'
.../CB Projects/Fort_empty/main_fort.f90:110: undefined reference to `dtrcon_'
.../CB Projects/Fort_empty/main_fort.f90:124: undefined reference to `dlamch_'
.../CB Projects/Fort_empty/main_fort.f90:130: undefined reference to `ddisna_'
collect2: ld returned 1 exit status
What really am I doing wrong?
oBFusCATed:
--- Quote from: asd34 on June 06, 2012, 06:44:17 pm ---What really am I doing wrong?
--- End quote ---
You're not searching the internet using part of the error message, like searching for "undefined reference to `dlansy_'" ...
xunxun:
Please note, which compiler is your lapack.lib/blas.lib built?
If lapack.lib/blas.lib is built using intel compiler, there will be a capital symbol for this.
So there will be no dlansy_, and there will be only "DLANSY"
To solve the issue, you can rebuild lapack using gfortran.
Or using Fortran 2003 ISO_C_BINDING Module to change the symbol.
Navigation
[0] Message Index
[*] Previous page
Go to full version