Lately I have been playing around with openFrameworks. This is a creative coding framework written in C++. A Qt project template is provided to ease setup etc.
This prompted me to get into the Qt universe. Especially since they provide a full featured IDE for C++ development.
The first thing that must be done however, is to configure the build system.

1
Setting up the toolchain.
Using the Qbs build system we can find out what toolchains are available on my system:
➜ qbs setup-toolchains --detect
Trying to detect gcc...
Profile 'gcc' created for '/bin/gcc'.
Trying to detect clang...
Profile 'clang' created for '/bin/clang'.


setup-toolchains automatically creates a profile for each toolchain detected.



The Qt5 install contains several examples. Here I can set up my own toolchain for one of these, helloworld-minimal

First I have to copy the examples into a folder that i have access to:

➜ cp /usr/share/qtcreator/qbs/share/qbs/examples/helloworld-minimal
/usr/share/qtcreator/qbs/share/qbs/examples/ ~/Mystuff/QBS_examples && cd ~/MyStuff/QBS_examples/hellowworld-minimal




➜ qbs profile:gcc                                                                          
Build graph does not yet exist for configuration 'default'. Starting from scratch.         
Resolving project for configuration default                                                
Setting up build graph for configuration default                                           
Building for configuration default                                                         
compiling main.cpp [HelloWorld-minimal]                                                    
linking HelloWorld-minimal [HelloWorld-minimal]                                            
Build done for configuration default.       

The binary file can be found at:
~/MyStuff/QBS_examples/helloworld-minimal/default/HelloWorld-minimal.0a1619e1