How to install boost c++ libraries in OSX

15,641

Solution 1

The more modern package manager homebrew does this with a single

$ brew install boost

Solution 2

If you first install MacPorts, you can install Boost with a single command:

sudo port install boost

Solution 3

Did you download boost archive and unpack it? Why you downloaded bjam? What install files? Bootstrap can compile bjam on your computer. Short story howto install:

  1. Unpack the boost archive to desktop
  2. Navigate with terminal to boost directory (its something like /users/zbuffer/desktop/boost_1_46_1)
  3. type:
  4. ./bootstrap.sh
  5. pay attention to error messages
  6. if bootstrap may not execute and you need to allow it before:
  7. chmod +x bootstrap.sh
  8. if bootstrap worked type:
  9. ./bjam architecture=combined
  10. pay attention to error messages

If something is still wrong and you come back to ask here around then please write what exactly you did and at what step what happened.

Share:
15,641
node ninja
Author by

node ninja

Updated on June 14, 2022

Comments

  • node ninja
    node ninja almost 2 years

    I downloaded boostjam and put it in with the install files and tried to run it, the following error is displayed:

    error: error: no Jamfile in current directory found, and no target references specified.

  • node ninja
    node ninja about 13 years
    It successfully created the files, but they exist in a directory in my download directory. I don't think this is the right place to put them. Where should they be?
  • dubnde
    dubnde about 13 years
    +1 I normally use this too but it can sometimes lag behind if one needs the current and latest release all the time.
  • dubnde
    dubnde about 13 years
    ./bjam architecture=combined address-model=32_64 to get 32 and 64 bit support just in case you need them.
  • Ferruccio
    Ferruccio about 13 years
    They've been pretty good about keeping it up to date recently. It seems like the last few versions were available a few weeks after the official release.
  • dubnde
    dubnde about 13 years
    cool. thanks Ferruccio. I prefer MacPorts too as I don't have to worry about the downloads, commands and such like. Will probably revert back to MacPorts soon as it makes life really really easy