Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QtCreator. Mutliple versions of gcc
yannickj last edited by
I've been using Qt Creator for a few months now (and I'm very happy with it), but mostly as an editor (modify / navigate the code). Recently, I wanted to try to use it as a cross compilation environment using its kit/compiler system.
Everything seems simple enough when compilers are different eg clang and gcc. However, when I tried to set up g++-4.9 along with the default (g++-4.6) compiler of my ubuntu 12.04, creator will always choose the system's default g++.
I found several workarounds:
- Adding built steps with update-alternatives to switch default compiler before starting make.
- Create a specific mkspec forcing the compiler to g++-4.9
- Use the variable QMAKE_CXX to specify g++-4.9
But I feel that there must be an easier way, otherwise what use would it be to specify the full path of the compiler in Tools > Options > Build & Run > Compile ?
Can anyone help me with that ?