Using Boost, dlib, ofxLearn and OF on OSX 10.10

Dear All,
For the last couple days i have been batting my head over combining these 3 frameworks.
Just a preliminary note: everything on my computer was compiled for x86_64 and not i386. Does OF use clang++ -stdlib=libc++ ?

dlib C++ is a machine learning lib that I happen to like, it took me ages to compile on OSX (latest Xcode) since I was using the wrong Cmake parameters (you can see the thread here: .

With the help of davis I could finally open a dlib project in Xcode, compile, link and and run it. But then, problems started, with boost collisions (libc++ incompatibilities for instance: and cases like this: which I haven’t been able to resolve yet.

Not to mention this nightmare:

I tried taking the dlib project and using Boost from it --> didn’t work.
Then I tried using ofxLearn, which uses dlib, but that dlib version is very old, and my attempts to upgrade where futile.

What I have now: I compiled boost in two versions like so (I used this
sudo ./bjam --install --build-dir=i386 --toolset=darwin --link=static --runtime-link=static --threading=multi --layout=tagged --prefix=/usr/local/i386 architecture=x86 address-model=32 --with-system --with-thread --with-iostreams --with-date_time --libdir=/usr/local/i386/lib --includedir=/usr/local/i386/incl$

#sudo ./bjam --install --build-dir=x86_64 --toolset=darwin-4.2 --link=static --runtime-link=static --threading=multi --layout=tagged --prefix=/usr/local/x86_64 architecture=x86 address-model=64 --with-system --with-thread --with-iostreams --with-date_time --libdir=/usr/local/x86_64/lib --includedir=/usr/loca$

this is the result (ofxOSXb is my own Boost add on, the one called ofxOSXBoost with the fat binary didnt work for me):

I took the latest ofxLearn project and linked boost to it, but i have all the above mentioned compilation issues.

Ideally all I want to have is: ofxLearn with the latest Boost and latest dlib in a single project that compiles links correctly and runs under OSX 10.10 with the latest compiler chain.

Can any one help? this is just an example for the issues:


Edit: this is what I have now, I am sure I have boost compiled with i386. this only happnes with the latest version of dlib and boost.

made some progress … can compile and link … the most important header file //#include <dlib/image_processing/frontal_face_detector.h>
//#include <dlib/image_processing/render_face_detections.h> can not be imported without numerous compilation errors:

Can anyone take a look?

Tried everything from scratch on another OSX computer, still the same result. Whenever the aforementioned headers are included with boost, there are errors from dlib:

Working when the headers are not included:

Do you manage to compile ofxLearn with OF 0.9.0 on 64bits? I’m on OSX 10.10, Xcode 7. It compiles just in 32bit.