I could not include boost in xcode. I used the build instructions from the Boost documentation and wrote the search paths in xcode /usr/local/lib and /usr/local/include.
Any help please !
I have spent a long time trying to make this work. I could not make it work using the download from the Boost project homepage, so I used homebrew instead:
After homebrew is installed, I installed Boost using:
brew install boost
or, if you don't have python installed, using:
brew install boost --without-python
Without the --without-python it would not install on my machine.
Now, you can use:
#include <boost/regex.hpp>
or whatever you need from the Boost package.
In case you have boost already installed, use $ brew info boost
to get the correct path:
boost: stable 1.60.0 (bottled), HEAD
Collection of portable C++ source libraries
https://www.boost.org/
/usr/local/Cellar/boost/1.60.0_1 (11,139 files, 436.5M) *
Poured from bottle
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost.rb
I'm using boost with Xcode 3.2.1 on mac os 10.6.8
I had problems with using boost and Xcode today, finally I managed to make it work so I hope this helps:
download boost, I got the 1.52.0 today, untar it
install boost:
at first I couldn't do the ./bootstrap.sh
, it stopped after the first few lines. After some googling, I got the answer, it was because when I installed Xcode a long time ago, for some reason I didn't check the “Unix development" in the install options. At this point, reinstall a newer version of Xcode and check the "unix development line"
after that, the ./bootstrap
and ./b2
install worked fine
the lambda example:
at this point, the first example should work fine, if it doesn't try adding /usr/local/include
in the project settings/header search path
using thread or something else that requires to be built
threads require a specific dylib to work: libboost_system.dylib. on my system it was located in /usr/local/lib
after the ./b2 install
thingy
in the left part of the GUI, you can right click anywhere and select Add Existing File
if the file is hidden you can find a shortcut to get to usr/local/lib in the directory /Developer/SDKs/MacOSX10.6.sdk/usr/local
once the libboost_system.dylib
does appear in the Groups and Files part of the GUI, it should work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With