Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Cinder & the Boost Libraries

Introduction

The Boost libraries are a collection of peer-reviewed open source C++ libraries. These libraries are some of the highest quality on the planet. In fact they are so good, several have gone on to become part of the C++ standard itself. Many of the developers who work on Boost are members of the C++ committee.

Setting up Boost

If you have downloaded one of the pre-built packages from the Cinder website, Boost is already included - you're all set. However if you are building Cinder yourself from github, or you would like to upgrade your copy of Boost from the included version, these instructions will guide you through the process.

If you want to download the same version as the one we're using in Cinder (which we'd generally recommend), grab version 1.55. You can do so from this site: www.boost.org/users/download/

Now you'll need to put Boost inside your Cinder folder, and rename it boost. Your cinder directory should be laid out similarly to the screenshot below. At this point you should be all done if you are using Boost version 1.53, which is the version Cinder is currently built against. If you are moving to a different version of Boost, follow the build instructions below.

cinder_finder.png


Building Boost (Advanced Users)

Here's how to compile Boost yourself.

Mac OS X & iOS:
You'll need to replace tools/build/v2/user-config.jam with the following (and possibly correct the paths to the iOS SDKs):

using clang : osx
: xcrun clang -arch i386 -arch x86_64 -stdlib=libc++ -std=c++11 -mmacosx-version-min=10.7 -fvisibility-inlines-hidden
;
using clang : ios
: xcrun clang -arch armv7 -arch armv7s -stdlib=libc++ -std=c++11 -miphoneos-version-min=5.0 -fvisibility-inlines-hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/
;
using clang : ios_sim
: xcrun clang -arch i386 -stdlib=libc++ -std=c++11 -miphoneos-version-min=5.0 -fvisibility-inlines-hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/
;

MacOS X
cd cinder/boost
./bootstrap.sh –with-libraries=filesystem,system,date_time ./b2 -a -j4 toolset=clang-osx link=static stage cp stage/lib/*.a ../lib/macosx
iOS
rm -rf stage ./b2 -a -j4 toolset=clang-ios link=static stage
cp stage/lib/*.a ../lib/ios
iOS Simulator
rm -rf stage ./b2 -a -j4 toolset=clang-ios_sim link=static stage
cp stage/lib/*.a ../lib/ios-sim

Visual C++ 2012:
From the Visual Studio 2012 Command Prompt:
cd cinder\boost
bootstrap
b2 runtime-link=static debug-symbols=off optimization=space –with-filesystem –with-date_time –with-system –with-thread
copy stage\lib\*.lib ..\lib\msw\x86

Visual C++ 2012 x64:
From the Visual Studio 2012 Command Prompt:
cd cinder\boost
bootstrap
b2 runtime-link=static address-model=64 debug-symbols=off optimization=space –with-filesystem –with-date_time –with-system –with-thread

Visual C++ 2013:
From the Command Prompt, start by running C: Files (x86) Visual Studio 12.0.bat:
cd cinder\boost
bootstrap
b2 runtime-link=static debug-symbols=off optimization=space –with-filesystem –with-date_time –with-system –with-thread

Visual C++ 2013 x64:
From the Command Prompt, start by running C: Files (x86) Visual Studio 12.0.bat x86_amd64:
cd cinder\boost
bootstrap
b2 runtime-link=static address-model=64 debug-symbols=off optimization=space –with-filesystem –with-date_time –with-system –with-thread