PDA

View Full Version : configure.exe not honoring QMAKESPEC?



akos.maroy
22nd July 2008, 11:02
I configured & compiled Qt 4.3.5 using MinGW, and I'm running into a problem. I simply moved the directory structure from C:\src\qt-all-opensource-src-4.3.5 to C:\usr\qt-all-opensource-src-4.3.5

but now I can't run configure.exe -platform win32-g++ , as it somehow insists on the old location of mkspecs:



Generating Makefiles...
Could not find mkspecs for your QMAKESPEC(win32-g++) after trying:
C:/src/qt-all-opensource-src-4.3.5\mkspecs
Error processing project file: C:/usr/qt-all-opensource-src-4.3.5/projects.pro
Qmake failed, return code 3


even if explicitly set QMAKESPEC by:



set QMAKESPEC=C:\usr\qt-all-opensource-src-4.3.5\mkspecs


the result is the same. what might I be doing wrong?

ChristianEhrlicher
22nd July 2008, 12:05
QMAKESPEC has to be set to a Compiler type, not a path. so win32-g++ is correct.
Your problem is that you can't move around the Qt installation without modifying/creating qt.conf (http://doc.trolltech.com/4.3/qt-conf.html)

akos.maroy
22nd July 2008, 12:15
QMAKESPEC has to be set to a Compiler type, not a path. so win32-g++ is correct.

yes, I tried this was well - and got the the same results


Your problem is that you can't move around the Qt installation without modifying/creating qt.conf (http://doc.trolltech.com/4.3/qt-conf.html)

I see. is there a way to include qt.conf with the Qt installation itself? from the documentation it seems that one would have to include qt.conf with the applicaiton being developed, in essence hard-coding Qt's location.

how does the Qt installer do all this? it replaces the hard-coded directories somehow?

ChristianEhrlicher
22nd July 2008, 12:28
Your qt-installation isn't much more than an application.

The installer is modifying the shared libs afaik.

akos.maroy
22nd July 2008, 12:35
Your qt-installation isn't much more than an application.

I'm not sure what you mean :)

I have Qt installed somewhere, and I have my projects, several of them, depending on qmake & some on the Qt libs. I wouldn't want to hard-code the locaiton of Qt into any of my own projects, as the location differs between development systems and of course between platforms as well.


The installer is modifying the shared libs afaik.

I see... I searched all the files in the directory structure for the path that is supposedly 'burned in', but didn't find it anywhere. so if it is, it's not stored as a plain string.

Is there a way to re-create the Qt windows installer? :)

ChristianEhrlicher
22nd July 2008, 12:39
I'm not sure what you mean :)

Why don't you simply create a qt.conf for your Qt installation and try it out???

akos.maroy
22nd July 2008, 12:43
Why don't you simply create a qt.conf for your Qt installation and try it out???

I looked at the qt.conf page you sent, and from that page I deducted that I'd have to put the qt.conf file not into the Qt installation itself, but into the application I'm developing. am I misunderstanding something? where would I put the qt.conf file in the Qt installation directory structure?

ChristianEhrlicher
22nd July 2008, 12:45
into your bin dir like you would when it's a simple qt application... :mad:

akos.maroy
23rd July 2008, 13:45
into your bin dir like you would when it's a simple qt application... :mad:

oh, in $QT_DIR/bin ... thanks - worked like a charm!