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
* for windows users only *
Before continuing to next steps make sure u have downloaded latest version of Qt.
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
That should do it !!!
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.
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.
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.
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.
When I installed Qt into folder ~/Qt/
and then manually renamed the folder into something other, I had similar problem. When I restored the folder name into the original ~/Qt/
(specified at the Qt installer), the problem has disappeared; all was solved.