Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: lbertolotti on June 27, 2017, 10:42:41 pm

Title: Link libraries
Post by: lbertolotti on June 27, 2017, 10:42:41 pm
Is there a way to link multiple libraries to a project? Say for example I want to link all the GNU Scientific Libraries to my project.
Title: Re: Link libraries
Post by: stahta01 on June 28, 2017, 12:29:49 am
http://wiki.codeblocks.org/index.php/FAQ-Compiling_(general)#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 (http://wiki.codeblocks.org/index.php/FAQ-Compiling_(general)#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)

Follow the "For your project :" section.

Tim S.
Title: Re: Link libraries
Post by: lbertolotti on June 28, 2017, 01:41:58 am
So if I want to link all libraries, I have to link them one by one?
Title: Re: Link libraries
Post by: BlueHazzard on June 28, 2017, 11:22:53 am
Quote
So if I want to link all libraries, I have to link them one by one?
what do you want to ask with this?
If you want to link GSL to your project you have to tell the compiler that you want to link GSL. If you additionally want to link OpenMP you have to tell the compiler you want also link OpenMP.
So probably yes: you have to tell the compiler/linker every single library you want to link against. Where else then from you should he know what version he has to use and from where he has to take it.

Of corse there is automation for this (mostly only on unix systems with pkg-config). But you give not much information on your environment so we can not help you with this..
Title: Re: Link libraries
Post by: lbertolotti on June 28, 2017, 04:27:10 pm
I use Windows 10 and Ubuntu 16.04.
I managed to get multiple libraries by holding SHIFT and CTRL.
Sometimes Code::Blocks is freezing, but no idea why.
Title: Re: Link libraries
Post by: BlueHazzard on July 09, 2017, 11:34:24 pm
disable symbol browser in
Settings->Editor->Code completition->Symbol browser
to get rid of the freezing (crashing)