-
Notifications
You must be signed in to change notification settings - Fork 3
Compiling Boost
Compiling Boost is fairly automated on all platforms. Just pick your operating system and follow the steps and you should be good to go.
The only prerequisite is that you have gcc or Xcode installed.
- First download Boost-1.74.0
- Unzip the archive to $BOOST_HOME
- A good example of $BOOST_HOME is /Users/username/Programming/Libraries/boost-1.52.0-src
- Open up a terminal
- cd to $BOOST_HOME
- Run ./bootstrap.sh (You may want to run bootstrap with
--help
the first time to see options like--prefix
)
- Open up a terminal
- cd to $BOOST_HOME
- Run "./b2 --stagedir=$INSTALL_HOME variant=release link=static threading=multi runtime-link=shared -j 8"
- A good example of $INSTALL_HOME is /Users/username/Programming/Libraries/boost-1.52.0
- Create a new folder $INSTALL_HOME/include
- Copy the $BOOST_HOME/boost folder into the $INSTALL_HOME/include folder
- Open up a terminal
- cd to $BOOST_HOME
- Run "./b2 --stagedir=$INSTALL_HOME variant=release link=shared threading=multi runtime-link=shared -j 8"
- A good example of $INSTALL_HOME is /Users/username/Programming/Libraries/boost-1.52.0
- Create a new folder $INSTALL_HOME/include
- Copy the $BOOST_HOME/boost folder into the $INSTALL_HOME/include folder
You can use static or shared boost libs, totally up to you. I prefer static libs for boost on Mac OS X. Otherwise you have to deal with settings the DYLD_LIBRARY_PATH all the time in Xcode to properly find the dylibs which is just a pain.
The only prerequisite is that you have Xcode installed.
- First download Boost-1.54.0
- Unzip the archive to $BOOST_HOME
- A good example of $BOOST_HOME is /Users/username/Programming/Libraries/boost-1.54.0-src
- Open up a terminal
- cd to $BOOST_HOME
- Run ./bootstrap.sh
- Create a file called /Users/username/user-config.jam
- Open the file with a text editor
- Paste the following block in
using clang : ios
: xcrun clang -arch armv7 -arch armv7s -stdlib=libc++ -std=gnu++11 -miphoneos-version-min=7.0 -mthumb -fvisibility=hidden -fvisibility-inlines-hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/
;
- Open up a terminal
- cd to $BOOST_HOME
- Run "./b2 --prefix=$INSTALL_HOME variant=release link=static threading=multi runtime-link=shared toolset=clang-ios -j 8 install"
- A good example of $INSTALL_HOME is /Users/username/Programming/Libraries/boost-1.54.0-device
- This will build the device version since it uses the arm architecture and iphone version
As a couple side notes, these instructions will not help you build boost to run in the iOS simulator. If you want to do this you're going to have to follow the same process except build against the i386 architecture instead of the arm architecture. Also note that these instructions do not support the new x64 architecture for iOS.
Compiling Boost is fairly automated. The only prerequisite for these instructions is that you have Visual Studio installed.
- First download Boost-1.52.0
- Unzip the archive to $BOOST_HOME
- A good example of $BOOST_HOME is C:\libraries\boost-1.52.0-src
- Open up a terminal (run->cmd)
- cd to $BOOST_HOME\tools\build\v2
- Run bootstrap.bat
- Run b2 install --prefix=$PREFIX
- A good example of $PREFIX is C:\libraries\boost-build-1.52.0
- Add $PREFIX\bin to your $PATH environment variable
- Open up a terminal
- cd to $BOOST_HOME
- Run "b2 --stagedir=$INSTALL_HOME toolset=msvc variant=release link=static threading=multi runtime-link=shared -j 8"
- A good example of $INSTALL_HOME is C:\libraries\boost-1.52.0
- Create a new folder $INSTALL_HOME\include
- Copy the $BOOST_HOME\boost folder into the $INSTALL_HOME\include folder
- Open up a terminal
- cd to $BOOST_HOME
- Run "b2 --stagedir=$INSTALL_HOME toolset=msvc variant=release link=shared threading=multi runtime-link=shared -j 8"
- A good example of $INSTALL_HOME is C:\libraries\boost-1.52.0
- Create a new folder $INSTALL_HOME\include
- Copy the $BOOST_HOME\boost folder into the $INSTALL_HOME\include folder
- Add $INSTALL_HOME\bin to your $PATH environment variable to pick up the dlls at runtime
Right now the CMakeLists.txt file sets some fairly strict requirements on the Boost library to help make it easier to actually find all the libraries for you. Right now it's set to use a static, multi-threaded library with a shared runtime. Unless you absolutely need to use shared Boost libraries on Windows, it is highly recommended that you use the "preferred method" above to build boost.
Compiling Boost is fairly automated. The only prerequisite is that you have gcc installed.
- First download Boost-1.52.0
- Unzip the archive to $BOOST_HOME
- A good example of $BOOST_HOME is /home/username/Programming/Libraries/boost-1.52.0-src
- Open up a terminal
- cd to $BOOST_HOME
- Run ./bootstrap.sh
- Open up a terminal
- cd to $BOOST_HOME
- Run "./b2 --stagedir=$INSTALL_HOME variant=release link=shared threading=multi runtime-link=shared -j 8"
- A good example of $INSTALL_HOME is /home/username/Programming/Libraries/boost-1.52.0
- Create a new folder $INSTALL_HOME/include
- Copy the $BOOST_HOME/boost folder into the $INSTALL_HOME/include folder
- Add the $INSTALL_HOME to your $LD_LIBRARY_PATH to pick up the *.so's at runtime
- Open up a terminal
- cd to $BOOST_HOME
- Run "./b2 --stagedir=$INSTALL_HOME variant=release link=static threading=multi runtime-link=shared -j 8"
- A good example of $INSTALL_HOME is /home/username/Programming/Libraries/boost-1.52.0
- Create a new folder $INSTALL_HOME/include
- Copy the $BOOST_HOME/boost folder into the $INSTALL_HOME/include folder
You can use static or shared boost libs, totally up to you. I prefer shared libs for boost on Linux.