QT Creator and GCC 7


How can I configure QT Creator to use the latest version (7 I think) of the Gnu Compiler Collection ?


Google Qt specify compiler
If you have the latest version installed on your machine (especially if installed through a package manager), QT Creator should auto-detect it's presence. Open a project, go to tools-> Build&Run-> Compilers --- select the compiler you prefer from Auto-detected section.

If you installed the compiler from source or have it in an odd path, you'll have to hit "Add" and manually set a new one up with the right path.


You could also specify the compiler in the .pro file if it is in your $PATH, and this may be the preferred method if you use qmake or if you also intend to use c++ flags (see link below).

Last edited on
uses the libreries of qt. sudo apt-get install libqt4-core
Qt is supported on a variety of 32-bit and 64-bit platforms, and can usually be built on each platform with GCC, a vendor-supplied compiler, or a third party compiler. In Qt Creator, a kit specifies the compiler and other necessary tools for building an application for and running it on a particular platform.

Qt Creator automatically detects the compilers that are registered by your system or by an installer. You can add compilers to build applications by using other compilers or by using additional versions of the automatically detected compilers:

GNU Compiler Collection (GCC) is a compiler for Linux and macOS.
MinGW (Minimalist GNU for Windows) is a native software port of GCC and GNU Binutils for use in the development of native Microsoft Windows applications on Windows. MinGW is distributed together with Qt Creator and Qt installers for Windows.
Linux ICC (Intel C++ Compiler) is a group of C and C++ compilers for Linux.
Clang is a C, C++, Objective C, and Objective C++ front-end for the LLVM compiler for Windows, Linux, and macOS.
Nim is the Nim Compiler for Windows, Linux, and macOS.
QCC is the interface for compiling C++ applications for QNX.

Topic archived. No new replies allowed.