Results 1 to 2 of 2

Thread: Cross-compiling Qwt for ARM compile errors

  1. #1
    Join Date
    Oct 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Cross-compiling Qwt for ARM compile errors

    I have a setup and tested cross-compile enviroment using the angstrom gcc compiler.
    Qt Code:
    1. $qmake --version
    2. QMake version 2.01a
    3. 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:
    Qt Code:
    1. qwt_scale_draw.cpp: In member function ‘int QwtScaleDraw::minLabelDist(const QFont&) const’:
    2. 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:
    3. /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/include/qtopia/QtCore/qglobal.h:1867: note: candidate 1: bool qFuzzyCompare(double, double)
    4. /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/include/qtopia/QtCore/qglobal.h:1872: note: candidate 2: bool qFuzzyCompare(float, float)
    5. 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
    Qt Code:
    1. (qreal)0.0
    To copy to clipboard, switch view to plain text mode 
    fixes the error.

    The next error:
    Qt Code:
    1. qwt_plot_layout.cpp: In member function ‘void QwtPlotLayout::alignScales(int, QRectF&, QRectF*) const’:
    2. qwt_plot_layout.cpp:878: error: no matching function for call to ‘qMax(qreal, double)’
    3. qwt_plot_layout.cpp:915: error: no matching function for call to ‘qMin(qreal, double)’
    4. qwt_plot_layout.cpp:952: error: no matching function for call to ‘qMin(qreal, double)’
    5. qwt_plot_layout.cpp:989: error: no matching function for call to ‘qMax(qreal, double)’
    6. 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.
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cross-compiling Qwt for ARM compile errors

    Commited to SVN.

    Thanks for reporting,

    Uwe

Similar Threads

  1. How to cross-compiling in Qt
    By sanjeet in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 29th April 2011, 19:14
  2. Steps for cross compiling
    By Yayati.Ekbote in forum Installation and Deployment
    Replies: 0
    Last Post: 3rd March 2010, 11:20
  3. Cross-Compile to QT/X11 ARM
    By shiranraviv in forum Installation and Deployment
    Replies: 6
    Last Post: 18th December 2009, 12:22
  4. Replies: 0
    Last Post: 9th April 2009, 07:12
  5. cross compiling
    By tommy in forum Installation and Deployment
    Replies: 1
    Last Post: 8th March 2009, 19:02

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.