[Solved] Unable to build examples app on Mac OS X Mavericks: Qt 5.1.1
Just downloaded/installed Qt 5.1.1 on Mavericks. Trying to build the examples app (Qt188.8.131.52/5.1.1/clang_64/examples/examples.pro). Very bad out-of-the-box experience so far (using Qt Creator 2.8.1):
On "Build->Run qmake" I get 16 errors of the form "Unknown test function:qtHaveModule"
On "Build->Build All" I get quite a few syntax errors...basic stuff like "unknown type name 'QtWindow'" in examples/gui/rasterwindow/rasterwindow.h (and so on)
Clearly, something is awry in the initial setup/configuration of 5.1.1. I've done nothing other than click my way through the standard installer. I do have older Qt versions around -- in /usr/local/Trolltech/Qt-4* as well as in /Developer (4.7.4). I suppose it's possible there's some "interference" from these?
In any case, any help/advice appreciated... :-)
It seems indeed that it's the Qt 4 qmake that's being called. You should double check the kit used to build the examples.
As a side note, Mavericks has just been around for a few weeks and there's a lot of work currently done for Qt 5.2 to run properly on it. Mavericks came with a lot modifications some more subtle that others that changed some rules like caching of the preferences or setting the working directory differently than before which "breaks" user expectation on some functionality.
Thanks for the reply :-)
I've just had a look at my .profile and it does have a Qt 4 bin on the path. I'll double-check the project, etc. for anything else that might be affected. My goal is to get rid of the various old versions of Qt, but I cannot do that just quite yet (other "old stuff" is currently depending on it, alas)...
Sounds like perhaps I should jump to 5.2 at this point, and bail on 5.1.1? Not surprised that Mavericks would break stuff...
Even with one Qt 4 in your .profile you should be able to build with creator, that's why you should check the Qt versions/Kit that you are using. There's something fishy in there.
Since you are starting with Qt 5, then yes go with 5.2, note that you'll need Qt Creator 3 in order to run/debug programs built against 5.2.
If you need an update to date Qt 4, then I would suggest to upgrade to 4.8.5 or if compiling Qt is an option, get the latest git version.
Got 5.2.0 and a Qt Creator labelled as "3" (from http://download.qt-project.org/development_releases/qtcreator/3.0/3.0.0-beta/). The actual .app file has version as 2.8.82, which is the same as the one that comes packaged with with Qt5.2.0. So, I suppose this is the correct one...
In addition to the explicit Qt 4.8.3/bin on my path, turns out there's also a Qt 3.8.3 version of qmake and qtconfig in /opt/local/bin. Probably there from some past use of macports...hmm...
Looks like it's really time for some housekeeping. Your suggestion to go with 4.8.5 is probably the best approach, until I can move everything to 5.x :-)
...and had to get rid of a Qt 4.7.4 installed in the usual "system" places on a Mac...now happily compiling/running example programs. Thanks again for the help SGaist :-)
That makes a lot of Qt installed :-D
You're welcome !
Since you're have now a working setup, please update the thread title prepending [solved] so other forum users may know a solution has been found :)