Qt Creator needs a compiler to build. Compiler settings in set settings

I installed Qt Creator5 with the latest binaries. but when I run any program, it gives me this error.

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

I searched the entire Internet for an answer, but its inadequate and not helpful. Kindly answer how to get rid of this error.

+48
qt qt-creator
Feb 05
source share
7 answers

i also had the same problem as i did

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 donโ€™t know which of the two above made it work, but it worked.

For windows

Below this solution, several people worked. so itโ€™s worth a try.

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

+43
May 11 '13 at 1:10
source share

For me, in Windows 7, this was resolved by clicking the arrow icon next to the computer icon in the lower left corner of the Qt Creator screen above the green arrows, and then double-clicking the compiler in the list and rebuilding the project.

+13
Jul 09 '13 at 9:56 on
source share

* for Windows users only *

Before proceeding to the next steps, make sure you have the latest version of Qt installed.

  • Download and install minGW-64-bit from the link: https://sourceforge.net/projects/mingw-w64/files/latest/download
  • Remember the directory in which you install minGW.
  • Open the Qt creator and go to tools -> options -> Build and Run
  • In the Compilers tab, select add โ†’ MinGW โ†’
    Name: MinGW: path: find mingw-w64.bat (you will find this file in the directory in which you installed MinGW).
    ABI: x86 Windows msvc2015 pe 64bit

    Remember to apply your changes.

  • Go to set โ†’ add
    Name: GCC
    Device type: desktop
    Device: local PC (default for desktop)
    Compiler: minGW
    Qt Version: select new version

    Apply changes and restart qt

When creating a new project, make sure you use GCC as a set

If it still doesn't work, click the computer icon in the lower left above the play button โ†’ GCC โ†’ Build


OR

Go to the projects (it is located in the menu on the left) โ†’ Assembly steps โ†’ do โ†’ Redefine the minGw31-make.exe file โ†’ go to the path where you installed minGW / bin \ mingw32-make. exe
Do the same for clean steps too


If you still get any error after these steps, try setting Environment Variables

  • Press Win + Q
  • Enter "Environment Variables"
  • click "Edit system environment variables"
  • System Properties -> Advance -> Environment Variables
  • Click on the path ( NOTE: Use these steps very carefully and do not contact other parameters )
  • Click edit
  • press the right arrow to go to the end of the text.
  • enter a half-hour (if it is not at the end of it, because all system paths differ with a semicolon)
  • Insert the path "MinGW_installation_directory \ bin" (In my case, it was "G: \ Qt \ Tools \ mingw32 \ bin"). Make sure you copy and paste the CORRECT path
  • Click OK and apply the changes.


That should do it !!!

+7
Apr 11 '16 at 21:27
source share

user2304430 has this right, I struggled to figure it out. Above the green Run / Debug buttons in the lower left corner is a computer icon with a drop-down menu. There you must choose your kit.

I got in the circle for half an hour, checking that my sets are configured directly in the settings. But in fact, you need to select a set from the Computer Icon โ†’ pop-out menu in the lower left corner before it does anything.

It is amazing that the first many Google pages for this error do not show this, you think that almost all new users are faced with this.

+4
22 Sep '13 at 10:42 on
source share

I had a similar problem when developing on my Mac -

I tried to create a desktop development with the creator of QT 3.3.0 based on QT 5.4.0 (Clang 6.0 (Apple)) on OSX 10.9. Trying to manually modify my sets to use GCC, g ++ and CLANG. I finally found this very simple solution:

Delete the xxx.pro.user file, and then restart QT Creator. Then it automatically picks up your compilers / environments.

+2
Feb 10 '15 at 22:03
source share

There was the same problem on Fedora 22 after installing Qt5.5.

Installing the following packages did the trick:

 sudo dnf install gcc-c++ sudo dnf install mesa-libGL-devel 
0
Sep 13 '15 at 19:13
source share

When I installed Qt in the ~/Qt/ folder and then manually renamed the folder to something else, I had a similar problem. When I restored the folder name to the original ~/Qt/ (specified in the Qt installer), the problem disappeared; everything was decided.

0
Nov 26 '16 at 18:01
source share



All Articles