Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set up the compiler and debugger in QtCreator

In Qt for C++ , how do I setup a compiler and debugger in Windows for running a console application? It gave me this error when I try to debug an application :-1: error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.

like image 915
user3168129 Avatar asked Jan 07 '14 07:01

user3168129


People also ask

How do I add a compiler to QT?

Adding Custom CompilersIn the Name field, enter a name for the compiler. In the Compiler path field, enter the path to the directory where the compiler is located. In the Make path field, enter the path to the directory where the make tool is located. In the ABI field, specify the ABI version.

What compiler does Qt Creator use?

Qt Creator uses the C++ compiler from the GNU Compiler Collection on Linux. On Windows it can use MinGW or MSVC with the default install and can also use Microsoft Console Debugger when compiled from source code. Clang is also supported.


2 Answers

In general, you seem to lack the compiler and proper "kit" installation. Try to install msvc or mingw with the corresponding Qt installer, and then double check the kit settings.

If the auto-detection does not work out afterwards, you can always add a kit explicitly:

Select Tools > Options > Build & Run > Kits > Add.

You can find a screenshot below from my machine where you should look for that. Note that the screenshot was taken on my Linux box, but the place for the configuration should be unified on the UI.

enter image description here

See the documentation for further details:

Adding Kits

like image 110
lpapp Avatar answered Oct 15 '22 15:10

lpapp


You need to install a compiler, you gave no operating system details I will assume you are a windows user.

http://www.wikihow.com/Install-Qt-SDK-on-Microsoft-Windows

So far you only have the IDE, you need the compiler, you can install several different ones.

like image 29
ddoor Avatar answered Oct 15 '22 15:10

ddoor