How to know/change the compiler qt creator is using?

If you click here and there trying to find the current compiler qt creator is using, you will soon be disappointed. You can find many places mentioning about the compilers/debuggers, etc, but you just could not find what exactly the build tools it is using for your project. The first place you may find talking about the compiling tools is Tools/Options/Build&Run. It has quite a few tabs: General, Kits, Qt versions, Compilers, Debuggers, CMake, all having something like g++/mingw/gdb/msvc/qmake listed. Some are called auto-detected, others are called manual. We know they are all about compiling/building/linking. The dazzling list of all strange files makes you confused about which compiler/linker the creator is using for your current project.  Now you have to close the dialog and find elsewhere the exact build kits for your project. You’ll soon find another place talking about the compilers: click left panel/Projects/Build&Run. On this dialog, a lot of information related to building  and compiling is presented in front of you. But it still does not telling you exactly qt creator is using what compilers/building tools. I am amazed by the great efforts qt team tries to hide the current compiler.

The truth was uncovered when I accidentally hovered the mouse cursor over the little box on top of the second place I talked above. A tooltip popped up and showed the current compiler and debugger. If I had not hovered the mouse cursor on that little box for enough time, I would have never known the compiler I’m using.

All the difficulties finding the compiler configurations for a project own to the logic of the developers of qt team. They use a programming-oriented logic  instead of a user-oriented logic when designing Qt Creator. In the first place(Tools/Options/Build&Run), it auto detects and allows you to manually add possible compiler chains in your system, and gives names to the tools so that they can be referenced somewhere else. The second place(left panel/Projects/Build&Run) is where compilers are bounded to a project. They give a name(kit name) to a bunch of compiling/linking/debugging tools and assign a kit to a project. The little box displays the kit name and there is a little down arrow on the right of the little box, on which you can click to change to another kit from a set of kit names. The current kit won’t show in the available kits to switch to.

Posted in

Comments are closed, but trackbacks and pingbacks are open.