PDA

View Full Version : Can't compile Qwt 6.1-rc3 with Qt5.0.1 - linux



alketi
29th March 2013, 17:18
I'm unable to get Qwt compiled against QT5 in linux, which is blocking deployment of the solution.

Uwe, can you or someone offer some help?

Setup:
CentOS 6.2
Qt5.0.1 installed in /opt/qt5.0.1
Qwt6.1-rc3

Steps:
/opt/qt5.0.1/bin/qmake -o Makefile qwt.pro
cd src
/opt/qt5.0.1/bin/qmake -o Makefile src.pro
cd ..
make

This results in errors in qwt_dyngrid_layout.h -- qlayout.h: No such file or directory

So, in src.pro I add

greaterThan(QT_MAJOR_VERSION, 4) {
QT += widgets
QT += printsupport
QT += concurrent
}

And then re-run:
/opt/qt5.0.1/bin/qmake -o Makefile src.pro

Which results in:

Project MESSAGE: Warning: unknown QT: widgets
Project MESSAGE: Warning: unknown QT: printsupport
Project MESSAGE: Warning: unknown QT: concurrent

Questions:
1. I don't understand why QT += widgets is not in the src.pro file by default (for Qt > v4)?
2. I don't understand why I'm getting a qmake errors for += widgets (and the other two).


Note: I can build any of the qt5.0.1 examples and PRO files using the same steps as above. There, I get no warning about QT: widgets.

Uwe
30th March 2013, 06:42
Building Qwt 6.1 with Qt 5 works out of the box - in your case it looks like a broken Qt installation.

Uwe

alketi
30th March 2013, 23:13
SOLVED

The problem was a conflicting Qt 4.7.3 install in my home directory. For some reason, even though I explicitly called for qmake from the Qt5 install, something in the Qt4 install was still being used.

Thanks Uwe.

Can you tell us how you manage Qt4 & Qt5 support without explicitly using the QT += widgets switch in the pro file?

Uwe
31st March 2013, 12:17
Can you tell us how you manage Qt4 & Qt5 support without explicitly using the QT += widgets switch in the pro file?
In my environment nothing needs to be managed and "QT += widgets" is not necessary.

Uwe