Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt Creator needs a compiler set up to build. Configure a compiler in the kit options

Tags:

qt

qt-creator

I Have Installed Qt Creator5 with latest binaries. but when i am running any program it is giving me this error.

:-1: error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.

i have searched the whole internet for answer but its inadequate and not helping. kindly reply the way to get rid of this error.

like image 701
Vivek Saurav Avatar asked Feb 05 '13 05:02

Vivek Saurav


People also ask

Does Qt Creator come with compiler?

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.

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.

Does Qt need Creator?

You certainly don't have to use QtCreator to write a Qt program. You also don't have to use qmake but you are asking for trouble by not using it. To do anything even remotely interesting in Qt you will inevitably end up subclassing QObject .


2 Answers

For me on Windows 7 this was solved by clicking on the arrow icon next to the computer icon on the bottom left of the Qt Creator screen above green arrows and then double clicked a compiler on the list and rebuild the project.

like image 42
Allan Ojala Avatar answered Sep 20 '22 23:09

Allan Ojala


i was also having the same problem so what i did is

For linux

sudo apt-get install g++  sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev 

and then closed the qt creator and restarted it and it worked

i do not know which of the above two made it work but it worked !!

For Windows

Below given solution have worked for few people. so it is worth a try.

Delete this file C:\Users\AppData\Roaming\QtProject\qtcreator\toolchains.xml to solve the problem.

like image 86
Subham Tripathi Avatar answered Sep 21 '22 23:09

Subham Tripathi