Results 1 to 6 of 6

Thread: Cross-compile Qwt project to ARM on Windows

  1. #1
    Join Date
    Sep 2014
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Cross-compile Qwt project to ARM on Windows

    Hi!

    I'm working on a project which i would like to run both, on windows desktop and android as well, and i would like to use Qwt.

    I'm using Windows 7 32bit, Qt creator 5.3 and Qwt 6.1.1.

    I downloaded Qwt 6.1.1 and compile it in windows with mingw (with using qmake, mingw32-make, mingw32-make install).
    I can run the qwt example projects so it works perfectly on windows desktop.

    Without the Qwt part, i can deploy my project to android, i set up the android sdk, android ndk and apache ant to use the android armeabi compiler. Without qwt libraries it works like a charm. (On Nexus 7 first gen.)

    But when i try to complie a qwt example project with armeabi, it can not see the "qwt_"-headers.

    So, my question is that, how can i link qwt headers to the armeabi compiler?
    Anyway, is it possible to run qwt on android or i have to find another way to using charts on android?

    Sorry for my grammar and thanks for any advice!

  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-compile Qwt project to ARM on Windows

    I know that users reported being able to run Qwt on Android, but as I never did it myself ( don't have an Android device running ) I can't offer many details.

    But as you seem to have problems with cross compiling the Qwt examples it might be worth to disable "CONFIG += silent" in qwtbuild.pri and run make for an example again. Then you will see where the compiler tries to find the headers.

    Note that qmake projects files for building Qwt examples are different from what you would do, when building an usual application using Qwt. Here you would have to install Qwt properly ( make install ) first and add a "CONFIG += qwt" to the application project file ( see http://qwt.sourceforge.net/qwtinstall.html )

    In case of Android there might be issues with the installed qwt.prf file ( the one that gets included by the CONFIG line above ) because I never tried it. If so please report them, that I can fix it

    It would be nice to have a small HOWTO for using Qwt on Android - at least if there is something special to take care of. Maybe you can help here ?

    Uwe

  3. #3
    Join Date
    Sep 2014
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Cross-compile Qwt project to ARM on Windows

    Firstly, i will try to disable the CONFIG += silent in qwtbuild.pri, thanks for the advice.

    But theoretically, if i can tell for the armeabi compiler the locaton of the qwt headers, that should be work??

    I ask that because i compiled the qwt with mingw and i got .dll-s in the qwt6.1.1\lib, so under unix based os's cant handle theese kind of files so maybe thats why armeabi cant see the headers.

    Maybe i should compile qwt under linux and get the .so files and copy that to windows, and after that under windows i should link that .so files to armaebi compiler?

    Note that qmake projects files for building Qwt examples are different from what you would do, when building an usual application using Qwt. Here you would have to install Qwt properly ( make install ) first and add a "CONFIG += qwt" to the application project file ( see http://qwt.sourceforge.net/qwtinstall.html )
    I did it, under windows with mingw compiler, it works, i can make own projects with qwt diagrams.

    It would be nice to have a small HOWTO for using Qwt on Android - at least if there is something special to take care of. Maybe you can help here ?
    Of course if i can make it work.

  4. #4
    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-compile Qwt project to ARM on Windows

    Quote Originally Posted by schlett_tamas View Post
    But theoretically, if i can tell for the armeabi compiler the locaton of the qwt headers, that should be work??
    Of course - setting this path is done in the project files of the examples and is part of what you include with "CONFIG += qwt". As you have disabled the silent mode now you should be able to see what path gets added when looking at the commands used for compiling.

    I ask that because i compiled the qwt with mingw and i got .dll-s in the qwt6.1.1\lib, so under unix based os's cant handle theese kind of files so maybe thats why armeabi cant see the headers.
    No for compiling you don't need any dll's ( those are for linking ), so this can't be the issue. But of course there shouldn't be any dlls when cross compiling - if you have them your build of Qwt is not a cross compiled one.

    Maybe i should compile qwt under linux and get the .so files and copy that to windows, and after that under windows i should link that .so files to armaebi compiler?
    No all you need to do is to do a "qmake -spec xxx qwt.pro", where xxx is the spec file with all the settings for the target device ( the same specs you have used for cross compiling your standalone application ).

    Uwe

  5. #5
    Join Date
    Apr 2012
    Posts
    13
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Cross-compile Qwt project to ARM on Windows

    Quote Originally Posted by schlett_tamas View Post
    Hi!

    I'm working on a project which i would like to run both, on windows desktop and android as well, and i would like to use Qwt.

    I'm using Windows 7 32bit, Qt creator 5.3 and Qwt 6.1.1.

    I downloaded Qwt 6.1.1 and compile it in windows with mingw (with using qmake, mingw32-make, mingw32-make install).
    I can run the qwt example projects so it works perfectly on windows desktop.

    Without the Qwt part, i can deploy my project to android, i set up the android sdk, android ndk and apache ant to use the android armeabi compiler. Without qwt libraries it works like a charm. (On Nexus 7 first gen.)

    But when i try to complie a qwt example project with armeabi, it can not see the "qwt_"-headers.

    So, my question is that, how can i link qwt headers to the armeabi compiler?
    Anyway, is it possible to run qwt on android or i have to find another way to using charts on android?

    Sorry for my grammar and thanks for any advice!
    Pretty old thread but just for the record:

    Before building any qwt examples you have to be sure that you libs and headers are installed properly.

    On Windows with mingw/MSys you encounter this bug https://bugreports.qt.io/browse/QTBUG-52675 .
    Just look for smth. like $(INSTALL_ROOT:@msyshack@%=%) in the Makefiles.
    Do not know how to cirecumvent this on Windows in an elegant way...

  6. #6
    Join Date
    Apr 2012
    Posts
    13
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Cross-compile Qwt project to ARM on Windows

    I did not find an elegant way to solve that MSYS bug,
    but anyway qwt-6.1.3 gets built with qt-5.8 with Android API 22,
    it just does not get installed.

    Getting rid of libQt5PrintSupport.so dependency with
    Qt Code:
    1. CONFIG += QT_NO_PRINTER
    2. or
    3. DEFINES += QT_NO_PRINTER
    To copy to clipboard, switch view to plain text mode 
    did not help, but that is not a show stopper.

    If a stand-alone app is made out of controls example, its contols.pro could look like:
    Qt Code:
    1. QT += core gui concurrent
    2.  
    3. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    4.  
    5. TARGET = controls
    6. TEMPLATE = app
    7.  
    8.  
    9. SOURCES += main.cpp \
    10. dialbox.cpp \
    11. dialtab.cpp \
    12. knobbox.cpp \
    13. knobtab.cpp \
    14. sliderbox.cpp \
    15. slidertab.cpp \
    16. wheelbox.cpp \
    17. wheeltab.cpp
    18.  
    19. HEADERS += \
    20. dialbox.h \
    21. dialtab.h \
    22. knobbox.h \
    23. knobtab.h \
    24. sliderbox.h \
    25. slidertab.h \
    26. wheelbox.h \
    27. wheeltab.h
    28.  
    29. INCLUDEPATH += "D:\QT_LIBS\Qwt-6.1.3-svn\include"
    30. DEPENDPATH += "D:\QT_LIBS\Qwt-6.1.3-svn\include"
    31.  
    32. android {
    33. QWT_PATH = "D:\QtProjects\build-qwt-Android_f_r_armeabi_v7a_GCC_4_9_Qt_5_8_0_715d62-Release\lib"
    34. LIBS += -L$$QWT_PATH -lqwt
    35. message($$QWT_PATH)
    36. message("android")
    37. }
    38.  
    39. win32 {
    40. LIBS += "D:\QtProjects\build-qwt-Desktop_Qt_5_8_0_MSVC2015_64bit-Release\lib\qwt.lib"
    41. message("windows")
    42. message($$LIBS)
    43. }
    44.  
    45. contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
    46. ANDROID_EXTRA_LIBS = \
    47. D:/QtProjects/controls/../build-qwt-Android_f_r_armeabi_v7a_GCC_4_9_Qt_5_8_0_715d62-Release/lib/libqwt.so \
    48. $$PWD/../../Qt/Qt-5.8.0-android/5.8/android_armv7/lib/libQt5PrintSupport.so
    49. }
    To copy to clipboard, switch view to plain text mode 

    There are some warnings about unused DT entries at the start of the app,
    well, at least the app starts and works.

Similar Threads

  1. Cross compile
    By Ichi in forum Newbie
    Replies: 9
    Last Post: 3rd April 2013, 21:49
  2. Replies: 2
    Last Post: 19th July 2012, 15:25
  3. Replies: 0
    Last Post: 10th July 2012, 22:16
  4. Cant cross compile onto Windows CE 5
    By Willybood in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 27th October 2010, 00:38
  5. Project won't compile under Windows (works under Linux)
    By philski in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2006, 16:29

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.