How to install boost c++ libraries in OSX
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 speci开发者_高级运维fied.
The more modern package manager homebrew does this with a single
$ brew install boost
If you first install MacPorts, you can install Boost with a single command:
sudo port install boost
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:
- Unpack the boost archive to desktop
- Navigate with terminal to boost directory (its something like /users/zbuffer/desktop/boost_1_46_1)
- type:
- ./bootstrap.sh
- pay attention to error messages
- if bootstrap may not execute and you need to allow it before:
- chmod +x bootstrap.sh
- if bootstrap worked type:
- ./bjam architecture=combined
- 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.
I found this link helpful. I ended up having to use the following command to ensure 64 bit support as well which I need
./bjam architecture=combined address-model=32_64
In order to avoid troubles compiling third party libraries that need boost installed in your system, run this:
sudo port install boost +universal
精彩评论