Boost libraries and QtCreator on OSX - all together now

After first contact with the Boost libraries I faced first obstacles, sorted them out and tried to use them with QtCreator. Upon subsequent reading some mails and forum entries this problem is not uncommon, but nobody provided a solution. So I used this journey to figure it out on my own.

Here is a follow up with the concentrated insight.

  1. prepare the build process (this time all libraries)
export build=~/devtools # or wherever you'd like to build
cd $build/boost_1_53_0
# remove traces from the last time
./b2 --clean-all
rm project-config.jam*
# prepare
-n Building Boost.Build engine with toolset darwin... 
-n Detecting Python version... 
-n Detecting Python root... 
-n Unicode/ICU support for Boost.Regex?... 
not found.
Generating Boost.Build configuration in project-config.jam...
Bootstrapping is done. To build, run:
To adjust configuration, edit 'project-config.jam'.
Further information:
   - Command line help:
     ./b2 --help
   - Getting started guide:
   - Boost.Build documentation:
  1. build
Building the Boost C++ Libraries.
Performing configuration checks
    - 32-bit                   : no
    - 64-bit                   : yes
    - x86                      : yes
    - has_icu builds           : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
    - iconv (libc)             : no
    - iconv (separate)         : yes
    - icu                      : no
    - icu (lib64)              : no
    - gcc visibility           : yes
    - long double support      : yes
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
Component configuration:
    - atomic                   : building
    - chrono                   : building
    - context                  : building
    - date_time                : building
    - exception                : building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : building
    - iostreams                : building
    - locale                   : building
    - math                     : building
    - mpi                      : building
    - program_options          : building
    - python                   : building
    - random                   : building
    - regex                    : building
    - serialization            : building
    - signals                  : building
    - system                   : building
    - test                     : building
    - thread                   : building
    - timer                    : building
    - wave                     : building
# many, many lines of comments
# felt like 5 minutes compile time
...updated 748 targets...
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
The following directory should be added to linker library paths:
  1. Change the install_name in all libraries
cd $build/boost_1_53_0/stage/lib
for DYNLIB in $(ls libboost*.dylib);do install_name_tool -id "$(pwd)/${DYNLIB}" "$(pwd)/${DYNLIB}";done
for OUTER in $(ls libboost*.dylib);do for INNER in $(ls libboost*.dylib);do install_name_tool -change "${INNER}" "@loader_path/${INNER}" ${OUTER};done;done
  1. check one of them
otool -L $build/boost_1_53_0/stage/lib/libboost_filesystem.dylib /Users/sven/devtools/boost_1_53_0/stage/lib/libboost_filesystem.dylib:
	/Users/sven/devtools/boost_1_53_0/stage/lib/libboost_filesystem.dylib (compatibility version 0.0.0, current version 0.0.0)
	@loader_path/libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
  1. configure usage in .PRO file of QtCreator
QMAKE_POST_LINK += ;/Developer/Tools/Qt/macdeployqt $${OUT_PWD}/$${TARGET}.app -no-strip

Done :-)