Qt Creator needs a compiler set up to build. Configure a compiler in the kit options
Solution 1
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.
Solution 2
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.
Solution 3
* for windows users only *
Before continuing to next steps make sure u have downloaded latest version of Qt.
- Download and install minGW-64-bit from link: https://sourceforge.net/projects/mingw-w64/files/latest/download
- Remember The directory to which you install minGW.
- Open Qt creator and go to tools -> options -> Build and Run
In Compilers tab Select add -> MinGW ->
Name: MinGW
path: Browse for mingw-w64.bat (you will find this file in the directory in which you have installed MinGW).
ABI: x86 Windows msvc2015 pe 64bit
Don't forget to apply your edits.Go to Kit -> add
Name: GCC
Device Type: Desktop
Device: Local PC (Default for desktop)
Compiler: minGW
Qt Version: select newest version
Apply changes and restart qt
While creating new project make sure you use GCC as kit
If it still doesn't works Click computer icon on bottom left above play button -> GCC -> Build
OR
Go to projects (It is in the menu on left hand side) -> Build Steps -> make -> Override minGw31-make.exe -> browse to path in which you have installed minGW/bin\mingw32-make.exe
Do the same for clean steps too
If u Still get any error after these steps try setting Environment Variables
- Press Win+Q
- Type " Environment variables "
- click on " Edit the system environment variables "
- System Properties -> Advance -> Environment Variables
- Click on path (NOTE : Use These steps very carefully and do not mess with other options)
- Click edit
- press right arrow to go to end of text
- type a semi-colon (if it isn't at the end of it because all the system paths are distinguished by a semi-colon)
- paste path "MinGW_installation_directory\bin" (In my case it was "G:\Qt\Tools\mingw32\bin"). Make sure you copy and paste CORRECT path
- Click OK and apply the changes.
That should do it !!!
Solution 4
user2304430 has it right, I struggled also figure it out. Above the green Run/Debug buttons in the bottom left, there's a computer icon with a pop-out menu. In there, you have to select your kit.
I went in circles for half an hour checking that my kits were set up right in options. But you actually have to select the kit in the Computer Icon -> pop-out menu in the bottom left before it does anything.
Amazingly, the first many Google pages for the error don't show this, you'd think almost all new users run into this.
Solution 5
I had a similar issue when developing on my Mac -
I was trying to do desktop development with QT creator 3.3.0 based on QT 5.4.0 (Clang 6.0 (Apple)) on OSX 10.9. After trying to manually modify my kits to use GCC, G++, and CLANG. I finally found this really simple solution:
Delete the xxx.pro.user
file and then restart QT Creator. It should then automatically pick up your compilers/environments.
![Vivek Saurav](https://i.stack.imgur.com/vOo6i.jpg?s=256&g=1)
Vivek Saurav
VIVEK SAURAV E-mail: [email protected] Blog: http://viveksaurav.blogspot.in/ Twitter: @saurav_vivek Facebook:@VivekBirendra Linkedin:@viveksaurav C# programmer, with a keen interest in all technologies Particular Areas :- C# language specifics WPF Xml
Updated on November 27, 2020Comments
-
Vivek Saurav over 3 years
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.
-
Artemix almost 11 yearsWelcome to Stack Overflow! The solution seems too textual to me.
-
Timothy C. Quinn over 10 yearsThanks. This worked for me on Ubuntu 13.1 with Qt Creator 3.0.0 / Qt 5.2.0.
-
Mahmoud almost 10 yearsofcourse the first one since you need the g++ compiler for C++
-
Subham Tripathi almost 10 years@AsfK . sorry but i do not have solution for windows.
-
Subham Tripathi almost 10 years@AsfK did you find a windows solution for it ?
-
paxdiablo about 8 yearsThere is no such file as shown in the Windows "solution". There is a file under
...users/USERNAME/appdata...
but deleting it does not fix the problem. -
Tae-Sung Shin over 7 yearsThis worked for VS2015. This problem seems to happen when the machine has multiple compilers. In addition, another problem with no debugger in Qt Creator was fixed by installing Windows SDK.
-
Eugene Gr. Philippov over 7 yearsThe linux part of this solution did not help me.
-
arqam almost 7 yearsI don't have : \Qt\Tools\mingw32 . After Tools it is QtCreator only.
-
Gustavo Parrado over 5 yearsThere's no QT version for any minGW 64
-
Franky about 5 yearsWhat about MacOS X please?