Mac: Moved from Qt5 back to Qt4: Makefile picking up wrong lib dir; but kit & including seems ok [SOLVED]
-
What is the output of:
@
qmake -v
@ -
@~/Library/Preferences > /Developer/Tools/Qt/qmake -v
QMake version 2.01a
Using Qt version 4.8.5 in /Library/Frameworks@(That's the qmake I'm pointing to in my Creator settings as well)
-
This is all very weird. Every part of configuration you mention looks correct.
-
To say the least. And very frustrating at my end.
-
Can you do a build from the command line ?
-
Never done that before. Copied the stuff from build settings in Creator, ran
@/Developer/Tools/Qt/qmake /Users/jan/Dev/TubulatorQt_4.8/src/TubulatorQt.pro -r -spec macx-g++ CONFIG+=x86_64@
which still generates the same #### line in the makefile:
@LIBS = $(SUBLIBS) -F/Library/Frameworks -L/Library/Frameworks -lssl -lcrypto -framework Foundation -framework Appkit -framework QtMacExtras -F/Users/jan/Qt5.0.2/5.0.2/clang_64/lib -framework AppKit -framework QtWidgets -F/Users/jan/Qt5.0.2/5.0.2/clang_64/qtbase/lib -framework QtGui -framework QtCore -framework QtScript -framework QtSql -framework QtNetwork @ -
looks like your are running qmake from 5.0.2 Oo
Do you have any Q environment variable set in your console ?
-
But two posts above, qmake -v tells me it's 4.8.5. Same binary location.
Environment variables: Not that I know of. What would I check for?
-
This could give you some nice results:
@
env | grep Q
@ -
@> env | grep Q
OLDPWD=/Users/jan/Dev/TubulatorQt_4.8
PWD=/Users/jan/Dev/TubulatorQt_4.8/build-TubulatorQt-Qt_4_8_Desktop-Debug@ -
I'm out of ideas ;)
Oh wait, just one more thing: see if you have a file named qt.conf anywhere on your OS. You can also take a look at Qt makespecs, maybe there are some problems there, but that would be insane.
-
Thanks anyway ;-)
Lots of qt.conf files, but none global (belongs to projects), and all only specifiy the plugins path.
I deleted the make specs before installing anew yesterday, so I doub't there'll be any references to an old Qt install location there.
-
Tried installing and uninstalling 5.0.2. As I suspected - no luck after that either.
Am I really forced to move to another computer?
-
What does a
@find / -name qmake@
return ?
-
Fixed it! I took a long, hard look at my .pro file, starting commenting things out and running quake to how it affected the Makefile.
The culprit was this line:
@LIBS += -framework Foundation -framework Appkit -framework QtMacExtras@
First off, QtMacExtras does not exist as a separate module in Qt 4 (AFAIK), so away it went. That wixed the complaint about missing QtWidgets module and include of 5.0.2 stuff.
What I still don't understand is
-
Why I wasn't getting a complaint about an unknown module instead of a reference to Qt5.0.2 stuff.
-
How the system would pick Qt5.0.2 as a candidate of where the module would be located. I have searched my system intensively, and I find NO references to 5.0.2. I would understand refs to 5.2.0, because that's installed and being used - but not 5.0.2.
-
-
You're correct, QtMacExtras is new for Qt 5.
-
you set the framework in LIBS, not the module QT, so it links directly
-
Did you build QtMacExtras with Qt 5.0.2 ?
-
-
-
Got it, thanks!
-
I do recall building Extras. There's a QtMacExtras.framework in my /Library/Frameworks folder, but it says 5.1 in the Info.plist file. Not sure if that can be trusted though. Is the Qt framework location baked into the .framework bundle? That has to be the only place the Qt install location can be picked up, right?
-
-
-
You're welcome !
-
You could have a look at the library in the framework with otool -L to see with what it's linked
-