Building qwt-6.0.2 with qt-4.8
This is my first post here, so please be patient with me.
I am trying to build qwt-6.0.2 against qt-4.8.0 on RedHat Enterprise Linux 6 64bit computer. The build fails with many errors and here is the beginning of it:
zms@ilc-esb09 $ qmake
zms@ilc-esb09 $ make
cd src/ && make -f Makefile
make[1]: Entering directory `/opt/qt/qwt-6.0.2/src'
g++ -c -pipe -Wall -W -g -fPIC -I/usr/lib64/qt-3.3/mkspecs/default -I. -I/opt/qt/qt-4.8/Desktop/Qt/4.8.0/gcc/include -Imoc/ -o obj/qwt_abstract_scale_draw.o qwt_abstract_scale_draw.cpp
In file included from qwt_abstract_scale_draw.h:13,
from qwt_abstract_scale_draw.cpp:10:
qwt_global.h:13:21: error: qglobal.h: No such file or directory
In file included from qwt_scale_div.h:14,
from qwt_abstract_scale_draw.h:14,
from qwt_abstract_scale_draw.cpp:10:
qwt_interval.h:15:20: error: qdebug.h: No such file or directory
In file included from qwt_abstract_scale_draw.h:14,
from qwt_abstract_scale_draw.cpp:10:
qwt_scale_div.h:15:19: error: qlist.h: No such file or directory
In file included from qwt_abstract_scale_draw.h:15,
from qwt_abstract_scale_draw.cpp:10:
qwt_text.h:14:21: error: qstring.h: No such file or directory
qwt_text.h:15:19: error: qsize.h: No such file or directory
qwt_text.h:16:19: error: qfont.h: No such file or directory
I have successfully build qwt-6.0.2 against qt-4.7.0 on rhel5 32bit Linux.
The build output is entirely different in this successful case, where I do not see the g++ command, instead
compiling <some file.cpp>
is printed for each file that is being compiled. Could be that something is not right with my qt installation?
I appreciate any suggestions as to what I need to do to correct this problem.
Thanks,
Zen
Re: Building qwt-6.0.2 with qt-4.8
Quote:
Originally Posted by
iamzen
g++ -c -pipe -Wall -W -g -fPIC -I/usr/lib64/qt-3.3/mkspecs/default ...
Qwt 6.x is not compatible with Qt 3.3.
Uwe
Re: Building qwt-6.0.2 with qt-4.8
Thank you Uwe.
RHEL6 comes with qt-3.3 and qt-4. I have installed qt-4.8 64bit version and could not figure out what to modify so that the qt-3.3 was not being dragged in, so I have uninstalled it. This is probably not the best solution but I was able to build qwt.
Zen
Re: Building qwt-6.0.2 with qt-4.8
Quote:
Originally Posted by
iamzen
Thank you Uwe.
RHEL6 comes with qt-3.3 and qt-4. I have installed qt-4.8 64bit version and could not figure out what to modify so that the qt-3.3 was not being dragged in, so I have uninstalled it. This is probably not the best solution but I was able to build qwt.
Zen
The trick is to use the qmake that come with the target qt installation. If you call /usr/path-to-qt4.8/bin/qmake the qwt will be built correctly.
Re: Building qwt-6.0.2 with qt-4.8
Quote:
Originally Posted by
eehmke
The trick is to use the qmake that come with the target qt installation. If you call /usr/path-to-qt4.8/bin/qmake the qwt will be built correctly.
7 years after this was answered, I have the same problem. I am building qwt-6.1.3 with Qt-4.8.6 on Ubuntu 16.04.
>which qmake
gives
/usr/local/Qt-4.8.6/bin/qmake
I do:
qmake qwt.pro
make
and get:
compiling qwt_abstract_scale_draw.cpp
In file included from qwt_abstract_scale_draw.h:15:0,
from qwt_abstract_scale_draw.cpp:10:
qwt_text.h:16:19: fatal error: qfont.h: No such file or directory
compilation terminated.
But of course qfont.h is there:
/usr/local/Qt-4.8.6/include/Qt/qfont.h
/usr/local/Qt-4.8.6/include/QtGui/qfont.h
The same happens if I use:
/usr/local/Qt-4.8.6/bin/qmake qwt.pro
What am I doing wrong?
1 Attachment(s)
Re: Building qwt-6.0.2 with qt-4.8
Here is the Makefile (with '.txt' added/)
Re: Building qwt-6.0.2 with qt-4.8
Remove CONFIG += silent in qwtbuild.pri and check the include path in the compiler commands that are printed to the console.
Uwe
Re: Building qwt-6.0.2 with qt-4.8
Hi Uwe,
I found the answer and thought I posted it yesterday, but it didn't appear.
'make clean' does not remove src/Makefile. I had started trying to build with Qt5, but then switched to using Qt4. src/Makefile contained references to Qt5 from my first attempt, and since I had removed Qt5 from my system the build failed. After I deleted src/Makefile everything went smoothly.
I suggest a small change to the build system to ensure that src/Makefile is removed on a clean (maybe later versions of qwt already have that change.)
Gib
Re: Building qwt-6.0.2 with qt-4.8
This is what make distclean is doing.
Uwe
Re: Building qwt-6.0.2 with qt-4.8
Thanks, I didn't know about that.