Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I have this error in QT creator: Could not find qmake configuration file linux-g++-64

Tags:

I will work with QT 4.8.6 and i install from Linux Mint software center this three: qt4-dev-tools, qt creator and qt4-make. But when i will open a project (.pro) programmed with qt4 i obtain this errors on qt creator:

Error while parsing file /home/daniel/SpiderOak Hive/Estudio de Desarrollo de interfaces/QT/Ejercicios QT/tema02/application/application.pro. Giving up.
Could not find qmake configuration file default.
Could not find qmake configuration file linux-g++-64.
Error while parsing file /home/daniel/SpiderOak Hive/Estudio de Desarrollo de interfaces/QT/Ejercicios QT/tema02/application/application.pro. Giving up.

Yes, i'm a newbie. What can i do for solve this?

Edit: Here is the image when i will load the project. enter image description here

like image 355
Daniel Ruiz Avatar asked Dec 17 '14 11:12

Daniel Ruiz


People also ask

Where is QMake in Qt?

qmake.exe is in bin directory of your Qt installation folder (along with all the Qt dlls for deployment). Your compiler should be detected automatically (check the Tools > Options > Build & Run > Compilers tab).


2 Answers

I will paste here just some theory for further debugging, because there is not enough info to solve issue.

How the build process works?

  1. qmake reads special "spec" file which contains information about what compiler You want to use etc etc etc

  2. Using these options qmake generates Makefile

  3. After that, make or cmake calls compiler, linker etc and builds Your project.

What your error means?

"Could not find qmake configuration file default."

means exactly that: qmake could not find this "compiler configuration" file from step 1.

Where these files are located?

In $QTDIR/mkspecs folder where $QTDIR is a place where QT is installed. You should check this folder and see a lot of subfolders there, including some which are missing.

How can I find $QTDIR?

Just run qmake --version and You will find where $QTDIR is located. On my machine, for example, it's, for example, /usr/lib/x86_64-linux-gnu/qt5

Warning: there can be A LOT OF DIFFERENT qmake executables installed in Your system (one for each qt version!). So, first of all, see what qmake executable You qtcreator uses!

So what shall I do?

  1. Figure where is Your $QTDIR. Ensure that Your QT creator knows it

  2. Check mkspecs folder and see what spec files are presented. If there is no such folder or you don't have the spec for Your compiler -- Your QT installation is broken.

like image 126
Arenim Avatar answered Sep 18 '22 19:09

Arenim


To resolve this specific issue:

Could not find qmake configuration file default.

Review your Qt Creator default kit:

  1. Tools > Options ...
  2. Select Build & Run
  3. Select your preferred kit
  4. Click "Make Default" button
  5. Click OK

Now reopen your project.

like image 35
Stephen Quan Avatar answered Sep 22 '22 19:09

Stephen Quan