Author Topic: Link libraries  (Read 329 times)

Offline lbertolotti

  • Multiple posting newcomer
  • *
  • Posts: 20
Link libraries
« 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.
Languages: C/C++, Python and R

Online stahta01

  • Lives here!
  • ****
  • Posts: 5846
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline lbertolotti

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Link libraries
« Reply #2 on: June 28, 2017, 01:41:58 am »
So if I want to link all libraries, I have to link them one by one?
Languages: C/C++, Python and R

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1372
Re: Link libraries
« Reply #3 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..

Offline lbertolotti

  • Multiple posting newcomer
  • *
  • Posts: 20
Re: Link libraries
« Reply #4 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.
« Last Edit: June 28, 2017, 07:41:36 pm by lbertolotti »
Languages: C/C++, Python and R

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1372
Re: Link libraries
« Reply #5 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)