PDA

View Full Version : QMAKESPEC has not been set, so configuration cannot be deduced



Rekha
12th July 2006, 10:29
hi to everyone,
i'm new to this forum.. i installed qt-x11-opensource-src-4.1.4 version n wrote a simple program to vieww the dialog box that was created using qtdesigner from command mode.
the commands that were used are,uic -o sample.h sample.ui .... to generate a sample.h file
qmake -project sample.pro ......... to create a .pro file
qmake -o makefile qt.pro ............. to build the file
but when i gave that command i got the following errors,
................................
MAKESPEC has not been set, so configuration cannot be deduced.
Error processing project file: qt.pro
..................

so please suggest me now what should i do?:confused:

jacek
12th July 2006, 11:12
qmake -project sample.pro
qmake -o makefile qt.pro
Shouldn't it be "qmake -o makefile sample.pro"?

Rekha
12th July 2006, 12:22
By default the .pro file generated by this command,
qmake -project sample.pro
is
qt.pro..
so i need to use that qt.pro than sample.pro
PLZ help me in solving this problem

ChristianEhrlicher
12th July 2006, 15:20
And what keeps you from setting QMAKESPEC? Or from using "qmake -spec linux-g++" or whatever your spec is?

jacek
12th July 2006, 18:04
By default the .pro file generated by this command,
qmake -project sample.pro
is
qt.pro..
so i need to use that qt.pro than sample.pro
No, you don't --- you just forgot to add "-o" before sample.pro:
qmake -project -o sample.pro

javi
27th January 2009, 10:04
I know is an old issue, but still unanswered...

Maybe the error is because you didn't load the QMAKESPEC env variable. You can look the ones you can choose on /usr/share/qt4/qmakespec (or qt3, depending)

set env QMAKESPEC linux-g++ (or instead linux-g++, yours)

In the compilation directory:

qmake -project
qmake
make

yehdev_cc
1st February 2009, 04:56
Hi, I've just got a similar question..
Is it normal not to have the folder '/usr/..../mkspecs' when compiling Qt4 from source ? Because I didn't get it after 'make install' ?
I managed to copy it from somewhere else .. but is this normal ?

jacek
1st February 2009, 15:25
Is it normal not to have the folder '/usr/..../mkspecs' when compiling Qt4 from source ?
Did you pass any paths to configure?

yehdev_cc
2nd February 2009, 04:03
Did you pass any paths to configure?
No I didn't ... :confused:

jacek
4th February 2009, 02:00
No I didn't ...
Then Qt should install itself in /usr/local/Trolltech/Qt-<version>. What does "qmake -query QMAKE_MKSPECS" print?

yehdev_cc
5th February 2009, 21:14
I just copied this directory from elsewhere... so, the output now may not give a very useful information about the problem .. I think.
I just don't know why this happened.. it should have created the folder, as make completed successfully without errors...

creatron
6th November 2012, 18:48
Just add this to the script before you run qmake.
Unix Bourne shell:

QMAKESPEC=/usr/local/qt/mkspecs/linux-g++
PATH=$PATH:/local/qmake/bin
export QMAKESPEC PATH

Unix C shell:

setenv QMAKESPEC /usr/local/qt/mkspecs/linux-g++
setenv PATH $PATH:/local/qmake/bin

Microsoft Windows:

set QMAKESPEC=c:\qt\mkspecs\win32-msvc
set PATH=%PATH%;c:\qmake\bin

qmake is now installed.