How to compile/link Boost with clang++/libc++?

I didn’t know how to do this either. But after poking around in here, the getting started, and trial and error:

$ ./bootstrap --with-toolset=clang
$ ./b2 clean
$ ./b2 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++"

You’ll get lots of warnings. And the signals library will fail to build due to LWG 2059. But otherwise I think it works.

Leave a Comment