I have a setup and tested cross-compile enviroment using the angstrom gcc compiler.
$qmake --version
QMake version 2.01a
Using Qt version 4.6.3 in /usr/local/angstrom/arm/lib
$qmake --version
QMake version 2.01a
Using Qt version 4.6.3 in /usr/local/angstrom/arm/lib
To copy to clipboard, switch view to plain text mode
I grabbed qwt from svn https://qwt.svn.sourceforge.net/svnr...anches/qwt-6.0.
Version 6.0.2
After running qmake and make I received the following compile error:
qwt_scale_draw.
cpp: In member function ‘
int QwtScaleDraw::minLabelDist(const QFont
&) const’
:qwt_scale_draw.cpp:236: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/include/qtopia/QtCore/qglobal.h:1867: note: candidate 1: bool qFuzzyCompare(double, double)
/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/include/qtopia/QtCore/qglobal.h:1872: note: candidate 2: bool qFuzzyCompare(float, float)
make[1]: *** [obj/qwt_scale_draw.o] Error 1
qwt_scale_draw.cpp: In member function ‘int QwtScaleDraw::minLabelDist(const QFont&) const’:
qwt_scale_draw.cpp:236: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/include/qtopia/QtCore/qglobal.h:1867: note: candidate 1: bool qFuzzyCompare(double, double)
/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/include/qtopia/QtCore/qglobal.h:1872: note: candidate 2: bool qFuzzyCompare(float, float)
make[1]: *** [obj/qwt_scale_draw.o] Error 1
To copy to clipboard, switch view to plain text mode
Looking into it, the qFastSin function uses qreal which in ARM is defined as float. So the qFuzzyCompare is being called with (float, double). Adding the cast
(qreal)0.0
(qreal)0.0
To copy to clipboard, switch view to plain text mode
fixes the error.
The next error:
qwt_plot_layout.
cpp: In member function ‘
void QwtPlotLayout::alignScales(int, QRectF
&,
QRectF*) const’
:qwt_plot_layout.cpp:878: error: no matching function for call to ‘qMax(qreal, double)’
qwt_plot_layout.cpp:915: error: no matching function for call to ‘qMin(qreal, double)’
qwt_plot_layout.cpp:952: error: no matching function for call to ‘qMin(qreal, double)’
qwt_plot_layout.cpp:989: error: no matching function for call to ‘qMax(qreal, double)’
make[1]: *** [obj/qwt_plot_layout.o] Error 1
qwt_plot_layout.cpp: In member function ‘void QwtPlotLayout::alignScales(int, QRectF&, QRectF*) const’:
qwt_plot_layout.cpp:878: error: no matching function for call to ‘qMax(qreal, double)’
qwt_plot_layout.cpp:915: error: no matching function for call to ‘qMin(qreal, double)’
qwt_plot_layout.cpp:952: error: no matching function for call to ‘qMin(qreal, double)’
qwt_plot_layout.cpp:989: error: no matching function for call to ‘qMax(qreal, double)’
make[1]: *** [obj/qwt_plot_layout.o] Error 1
To copy to clipboard, switch view to plain text mode
QRectF.left()/right() returns a qreal so casting it to a double eliminates this error.
I also ran into errors when it tried compiling MathML but since I don't need it I just commented it out in the qwt.pro file.
Attached is the diff file for what worked for me.
Bookmarks