Author Topic: Using boost library  (Read 3368 times)

Offline infomath

  • Single posting newcomer
  • *
  • Posts: 2
Using boost library
« on: May 14, 2013, 08:13:40 pm »
Hi,

I'm struggling right now to install and make the boost library work in Code::blocks. I was wondering, before I put more effort on the installation if it's easy to make an .exe file with code that works with boost (or any other extern libraries) ? In the end, I want my code to work on windows and linux and I want to make it easy to use and install by other users. Is it gonna be possible with boost ?

Thank you

PS pardon my lack of experience, I'm a beginner.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Using boost library
« Reply #1 on: May 14, 2013, 09:09:00 pm »
You have to compile 'boost' before trying to make it work with cb, have you? At least it's the case with the default download from boost.org.

zabzonk

  • Guest
Re: Using boost library
« Reply #2 on: May 14, 2013, 09:46:27 pm »
Quote
I want to make it easy to use and install by other users. Is it gonna be possible with boost ?

It depends what you mean by users, and what facilities of Boost you use. Many of Boost's features are header-only, which means that your code just needs to #include the relevant headers. And if you want to distribute your code, you can distribute the headers too. Other features (for example regular expressions) require creating and linking with the boost libraries. This makes life harder if you are distributing source code (effectively, you have to instruct your users on how to build and link the Boost libraries), but no more difficult if you want to simply distribute an executable.

Note that none of this has anything to do with Code::Blocks, and will probably be closed soon by a mod. You should ask non-C::B questions like this on sites like Stack Overflow, and/or http://www.reddit.com/r/learnprogramming