Results 1 to 6 of 6

Thread: Compile QWT for ARM linux

  1. #1

    Default Compile QWT for ARM linux

    I am writing an application using qwt runs on arm Linux, QWT was complied successfully, and I was able to compile and run my program using QwtPlot runs on Desktop Ubuntu 11.04. However, I got the following error while compiling to arm.

    root@zuoshu-laptop:/home/zuoshu/qtProjects/QtGUIsample# make
    /opt/qt-4.7.1/bin/uic mainwindow.ui -o ui_mainwindow.h
    arm-linux-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt-4.7.1/mkspecs/qws/linux-arm-g++ -I. -I/opt/qt-4.7.1/include/QtCore -I/opt/qt-4.7.1/include/QtNetwork -I/opt/qt-4.7.1/include/QtGui -I/opt/qt-4.7.1/include -I/usr/local/qwt-6.0.1/include -I. -I. -o main.o main.cpp
    arm-linux-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt-4.7.1/mkspecs/qws/linux-arm-g++ -I. -I/opt/qt-4.7.1/include/QtCore -I/opt/qt-4.7.1/include/QtNetwork -I/opt/qt-4.7.1/include/QtGui -I/opt/qt-4.7.1/include -I/usr/local/qwt-6.0.1/include -I. -I. -o mainwindow.o mainwindow.cpp
    /opt/qt-4.7.1/bin/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt-4.7.1/mkspecs/qws/linux-arm-g++ -I. -I/opt/qt-4.7.1/include/QtCore -I/opt/qt-4.7.1/include/QtNetwork -I/opt/qt-4.7.1/include/QtGui -I/opt/qt-4.7.1/include -I/usr/local/qwt-6.0.1/include -I. -I. mainwindow.h -o moc_mainwindow.cpp
    arm-linux-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/qt-4.7.1/mkspecs/qws/linux-arm-g++ -I. -I/opt/qt-4.7.1/include/QtCore -I/opt/qt-4.7.1/include/QtNetwork -I/opt/qt-4.7.1/include/QtGui -I/opt/qt-4.7.1/include -I/usr/local/qwt-6.0.1/include -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
    arm-linux-g++ -Wl,-O1 -Wl,-rpath,/opt/qt-4.7.1/lib -o QtGUIsample main.o mainwindow.o moc_mainwindow.o -L/opt/qt-4.7.1/lib -L/usr/local/qwt-6.0.1/lib/ -lqwt -lQtGui -L/usr/local/tslib/lib -L/opt/qt-4.7.1/lib -lQtNetwork -lQtCore -lpthread
    /usr/local/arm/4.4.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /usr/local/qwt-6.0.1/lib//libqwt.so when searching for -lqwt
    /usr/local/arm/4.4.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lqwt
    collect2: ld returned 1 exit status
    make: *** [QtGUIsample] Error 1
    root@zuoshu-laptop:/home/zuoshu/qtProjects/QtGUIsample#

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

    Default Re: Compile QWT for ARM linux

    Obviously /usr/local/qwt-6.0.1/lib//libqwt.so was not built for ARM.

    Uwe

  3. #3

    Default Re: Compile QWT for ARM linux

    Please teach me how to build qwt for arm. I have already run my helloworld widget on my arm device. Thank you!

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

    Default Re: Compile QWT for ARM linux

    Edit qwtconfig.pri and change the install directory ( to avoid conflicts with your PC build ). Then use qmake from the version you have built for ARM ( or use qmake -spec ..." and Qwt should be built with your cross compiler. You can disable "CONFIG += silent" in qwtbuild.pri to see if the right compiler gets started.

    For cross compiling your application you have to configure qmake to use the ARM version of Qwt ( read INSTALL ) and use "CONFIG += qwt" in the project file of your application.

    Uwe

  5. #5
    Join Date
    Sep 2011
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Compile QWT for ARM linux

    Dear Uwe, i already did as per instruction from you, however i got another problem, it's regarding to QtDesigner:

    make[1]: Entering directory `/home/hunglq/qwt-download/qwt-6.0/textengines'
    cd mathml/ && make -f Makefile
    make[2]: Entering directory `/home/hunglq/qwt-download/qwt-6.0/textengines/mathml'
    make[2]: Nothing to be done for `first'.
    make[2]: Leaving directory `/home/hunglq/qwt-download/qwt-6.0/textengines/mathml'
    make[1]: Leaving directory `/home/hunglq/qwt-download/qwt-6.0/textengines'
    cd designer/ && make -f Makefile
    make[1]: Entering directory `/home/hunglq/qwt-download/qwt-6.0/designer'
    rm -f libqwt_designer_plugin.so
    /usr/local/arm/bin/arm-none-linux-gnueabi-g++ -Wl,-rpath,/usr/local/Qt/lib -shared -o libqwt_designer_plugin.so obj/qwt_designer_plugin.o obj/qwt_designer_plotdialog.o obj/moc_qwt_designer_plugin.o obj/moc_qwt_designer_plotdialog.o obj/qrc_qwt_designer_plugin.o -L/usr/local/tslib/lib -L/usr/local/Qt/lib -L/home/hunglq/qwt-download/qwt-6.0/designer/../lib -lqwt -lQtScript -L/usr/local/Qt/lib -L/usr/local/tslib/lib -lQtXml -lQtGui -lQtNetwork -lQtCore -lQtDesigner -lpthread
    /usr/local/arm/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lQtDesigner
    collect2: ld returned 1 exit status
    make[1]: *** [plugins/designer/libqwt_designer_plugin.so] Error 1
    make[1]: Leaving directory `/home/hunglq/qwt-download/qwt-6.0/designer'
    make: *** [sub-designer-make_default-ordered] Error 2
    I'm using ubuntu 10.04... qtsdk 4.7.3, qt-everywhere 4.6.2, and qwt 6.0.2...

    Do you have any solution to help me solve this problem? Please let me know... thx alots...

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

    Default Re: Compile QWT for ARM linux

    It doesn't make any sense to cross-compile the designer plugin for the target platform, when the designer is not intended to run there ( at least you have disabled the designer itself in your Qt build ). Edit qwtconfig.pri and disable building it.

    From the INSTALL file:

    qwtconfig.pri and qwtbuild.pri are read by all project files of the Qwt
    package. qwtconfig.pri is also read by qwt.prf, when building your
    application. So the first step is to edit the *.pri files to adjust
    them to your needs.

    Uwe

Similar Threads

  1. Is it possible to compile Qt 4.7.1 on Linux using gcc 3.3.3?
    By hochl in forum Installation and Deployment
    Replies: 4
    Last Post: 1st April 2011, 21:19
  2. My first Linux QT program wont compile
    By GrahamLabdon in forum Newbie
    Replies: 1
    Last Post: 27th October 2010, 15:49
  3. Can't Compile on Ubuntu Linux
    By mpauley in forum Newbie
    Replies: 6
    Last Post: 9th April 2010, 22:00
  4. How do I compile for linux on windows?
    By waitingforzion in forum Newbie
    Replies: 4
    Last Post: 28th December 2009, 07:51
  5. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23

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.