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

Daniel Ruiz picture Daniel Ruiz · Dec 17, 2014 · Viewed 46.4k times · Source

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

Answer

Arenim picture Arenim · Nov 18, 2015

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.