Author Topic: Installing Boost library  (Read 7376 times)

oling

  • Guest
Installing Boost library
« on: December 01, 2008, 04:23:16 pm »
Hi,
I am trying to install Boost, running CodeBlocks and MinGW on Windows.
The Wiki instructions tell me to run the following in cmd window under the unpacked Boost folder "C:\Program Files\CodeBlocks\boost_1_36_0":

bjam --toolset=gcc "--prefix=<installpath>" install

( <installpath> is where I want to install Boost: "C:\Program Files\CodeBlocks")

However, bjam is not recognized (I already set the PATH parameter)! What am I doing wrong or what am I missing?

Thanks,
Oling


Offline simonl

  • Single posting newcomer
  • *
  • Posts: 7
Re: Installing Boost library
« Reply #1 on: December 01, 2008, 06:45:28 pm »
You have to build bjam first unless you've already downloaded a binary.  I spent ages trying to make get it work and never succeeded.  However I use boost a lot - most of the code doesn't need to be compiled.  regex for register expressions does but the author provides a makefile or you could just load the source (in libs/regex/src) into c::B and compile it to a static library.  There are a couple of other libraries (program_options for example) but I've got on very well without them.  Check boost install to see whether you need to compile anything.

To use it with C::B add boost header files to the include list when compiling (and if you have compiled boost libraries, do the same for lib files).  I've had no problem using it with C::B (but I only started using it a couple of days ago!)

Good Luck - boost is worth the effort

Simon

Offline CuteAlien

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: Installing Boost library
« Reply #2 on: December 01, 2008, 06:48:32 pm »
Not a c::b problem, but check here: http://www.boost.org/doc/tools/build/doc/html/jam/building.html
In short - build the bjam binary (or .exe) and put it somewhere in your path.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Installing Boost library
« Reply #3 on: December 01, 2008, 07:04:32 pm »
No, you don't have to build bjam. The wiki article links to the pre-built binary.

The problem is almost certainly that you are using a path with a space in it: "Program[space]Files". You'll have to put quotes around any paths that contain a space, including the PATH environment entry -- or, you could just move boost and bjam to a location without spaces in the path. This would make things much easier all around.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)