Install Qt5 from Git on Mac OS X Mountain Lion
-
Hello,
I have the following problem, I can't install Qt5 properly on my Mac. What I do:
@
mkdir qt5
cd qt5
git clone git://gitorious.org/qt/qtbase.git
cd qtbase
./configure -prefix $HOME/development/macosx/qt5 -nomake docs -nomake examples -nomake demos -nomake tests -opensource -confirm-license -release -no-c++11
make -s -j5
@At this point everything is fine, Qt5 is configured for building.
@
make -s -j5
@Qt5 builds fine!
@
make install
@Now libraries are copied to installation folder, which I specified via -prefix when configuring
I set up my environment
@
export PATH=$HOME/development/macosx/qt5/bin:$PATH
@Create simple project:
@
mkdir test
cd test
touch test.pro
open -e test.pro
@Put this in pro file:
@
TEMPLATE = app
QT += coreSOURCES += test.cpp
@Now create cpp file:
@
touch test.cpp
open -e test.cpp
@Put this in:
@
#include <QVector>int main()
{
return 0;
}
@Try to compile:
@
qmake
make
@Get the following error:
@
clang++ -c -pipe -mmacosx-version-min=10.6 -O2 -Wall -W -fPIE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I../../macosx/qt5/mkspecs/macx-clang -I. -I../../macosx/qt5/include -I/Users/romanp/development/macosx/qt5/include/QtGui -I../../macosx/qt5/lib/QtGui.framework/Versions/5/Headers -I../../macosx/qt5/include/QtCore -I../../macosx/qt5/lib/QtCore.framework/Versions/5/Headers -I. -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/System/Library/Frameworks/AGL.framework/Headers -o main.o main.cpp
In file included from main.cpp:1:
In file included from ../../macosx/qt5/lib/QtCore.framework/Versions/5/Headers/QVector:1:
../../macosx/qt5/lib/QtCore.framework/Versions/5/Headers/qvector.h:45:10: fatal error:
'QtCore/qalgorithms.h' file not found
#include <QtCore/qalgorithms.h>
^
@If I change #include <QVector> to #include <QtCore/QVector> I get the error even earlier:
@
main.cpp:1:10: fatal error: 'QtCore/QVector' file not found
#include <QtCore/QVector>
^
@Does anyone experience this problem? How to solve it?
Thanks! -
There is no need for "make install" when you are using prefix. But that is probably not the cause of this error.
Have you verified that those includes are there? try running it with:
@
qmake -spec macx-llvm
make
@ -
Actually I think you need to "make install", I verified that. Before I type "make install", I don't have anything in my installation folder. When I type "make install", libs are copied there.
I tried "qmake -spec macs-llvm && make", but this resulted in a whole bunch of errors. Also it tries to use g++ compiler, and I compiled Qt5 with clang... So I need to use clang
-
I still have this problem. I noticed if I build qt with -no-framework, it copies all the headers, but by default it doesn't. Help!