User forums > Using Code::Blocks

How to configure Lapack external libraries with C::B

(1/2) > >>

asd34:
hi all,

I'm new to the C:B enviroment. I wish to use the lapack libraries in the C::B IDE. Allthough I've managed to accurately configure the compiler and linker for gfortran. I couldn't figure out how to set up properly the external fortran libraries in Ide. I followed the guidance given in that link http://www.learncpp.com/cpp-tutorial/a3-using-libraries-with-codeblocks/

I set search directories, and compiler and linker libraries carefully under compiler debugger options, but it seems the program still coudn't locate the libraries and complains the "undefined reference to ......" I also set the path variable in the enviromental settings to point to the correct directory where required libraries resides but with no success.

What am I doing wrong?

Regards,

Freem:
We could have some use of the compile logs.
Especially the command used to link which is inside it.

In fact, we can do nothing without it. And it is highly probable that you could just look at it to find yourself the problem and fix it, in fact.

asd34:
Thanks for commenting ,
here is the log. but that doesn't ring any bell for me .
Everything that I know which malfunctioning is there, but don't know how to fix it.

The complained routines are missign subroutines, they reside in the blas.lib and lapack.lib static libraries.
I've added and specified directories conatining them properly but still doesn't work for me?

||=== Fort_empty, Debug ===|
obj\Debug\main_fort.o||In function `my':|
...Fort_empty\main_fort.f90|72|undefined reference to `dlansy_'|
...Fort_empty\main_fort.f90|73|undefined reference to `dlansy_'|
...Fort_empty\main_fort.f90|82|undefined reference to `dsygv_'|
...Fort_empty\main_fort.f90|104|undefined reference to `x04caf_'|
...Fort_empty\main_fort.f90|110|undefined reference to `dtrcon_'|
...Fort_empty\main_fort.f90|124|undefined reference to `dlamch_'|
...Fort_empty\main_fort.f90|130|undefined reference to `ddisna_'|
||=== Build finished: 7 errors, 0 warnings ===|

Regards,

Freem:
Please enable the full log:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Full log is verbose enough to give you hints about what is the problem.

And, I did not know that this FAQ exists but it could help you too: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

stahta01:
If the above two links do not fix the problem read this one.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F

Tim S.

Navigation

[0] Message Index

[#] Next page

Go to full version