Results 1 to 11 of 11

Thread: Cross-compile Qwt for WinCE 6

  1. #1
    Join Date
    Oct 2017
    Posts
    16
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Question Cross-compile Qwt for WinCE 6

    I successfully built Qwt 6.1.3 for Windows platform using VS2008.
    Now I need to cross-compile Qwt for WinCE 6; I found some threads on this forum, but I can't uderstand how to do it exactly.
    The basic problem is that I'm not an expert and I downloaded a pre-built version of Qt for WinCE directly from Toradex site.
    I can create Qt application cross-compiled for WinCE 6 selecting the platform "Toradex_CE600 (ARMv4I)" inside VS2008, but honestly speaking I don't know what there is exactly "behind the scenes".

    As far as I understand I need to instruct in some way qmake to cross-compile for the WinCE 6 target.
    In this post Uwe suggests
    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 ).
    but I don't know if this is true for WinCE too, and I don't know where to search for my .spec file.

    I found this thread that it's more or less my situation, but it seems that the user vicacid didn't succeed in building.
    Moreover I don't want to mess-up my Qwt build for Windows.
    I would like having both of the builds on my PC (I have Qt 4.8.4 for x86 and WinCE 6, in different folders).

    Could someone help, please?

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

    Default Re: Cross-compile Qwt for WinCE 6

    Quote Originally Posted by vix View Post
    but I don't know if this is true for WinCE too, and I don't know where to search for my .spec file.
    It should be part of your Qt installation.

    When looking on my linux box I can see several spec files that seem to be for WinCE 6:

    /disk1/qt/qt-everywhere-opensource-src-4.8.7/mkspecs/wince60standard-armv4i-msvc2005
    /disk1/qt/qt-everywhere-opensource-src-4.8.7/mkspecs/wince60standard-x86-msvc2005
    ...

    Have a look at your mkspecs directory to see, which one matches your environment best.

    Uwe

  3. #3
    Join Date
    Oct 2017
    Posts
    16
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Post Re: Cross-compile Qwt for WinCE 6

    Hello Uwe,
    thank you very much for your help.

    I looked inside my Qt installation (mkspecs directory) and I found several folders for several environment.
    I think the best one for my need is <wince60colibri-armv4i-msvc2008>.
    Inside this folder there are three files:
    • deafult_post.prf
    • qmake.conf
    • qplatformdefs.h


    Which one is exactly the "spec" file I need?
    I would have expected a file with .spec extension.

    If I understood I sould call
    Qt Code:
    1. qmake -spec <specfile> qwt.pro
    To copy to clipboard, switch view to plain text mode 

    Am I right?

  4. #4
    Join Date
    Oct 2017
    Posts
    16
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Cross-compile Qwt for WinCE 6

    I used the following command
    Qt Code:
    1. c:\qt\4.8.4\bin\qmake.exe -spec c:\qt\4.8.4\mkspecs\wince60colibri-armv4i-msvc2008 qwt.pro
    To copy to clipboard, switch view to plain text mode 
    where
    • Qt Code:
      1. c:\qt\4.8.4\bin\qmake.exe
      To copy to clipboard, switch view to plain text mode 
      is the full path to WinCE build of Qt
    • Qt Code:
      1. c:\qt\4.8.4\mkspecs\wince60colibri-armv4i-msvc2008
      To copy to clipboard, switch view to plain text mode 
      is the whole path to platform and compiler information, as explained here


    The generated Makefile seems ok to me (I can't attach because I get "invalid file" message).

    When I launch
    Qt Code:
    1. nmake install
    To copy to clipboard, switch view to plain text mode 
    in a VS2008 command prompt, the compilation starts, but then I get the following error

    Qt Code:
    1. Generating Code...
    2. linking ..\lib\qwtd.dll
    3. debug\qwt_abstract_scale_draw.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'THUMB'
    4. NMAKE : fatal error U1077: 'echo' return code '0x458'
    5. Stop.
    6. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' : return code '0x2'
    7. Stop.
    8. NMAKE : fatal error U1077: 'cd' : return code '0x2'
    9. Stop.
    To copy to clipboard, switch view to plain text mode 

    Which is the reason of this error?

  5. #5
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,247
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cross-compile Qwt for WinCE 6

    Obviously the object file has not been built for arm ( see X86 ). Maybe disable "CONFIG += silent" in qwtbuild.pri and check the commands being used for compiling.

    Uwe

  6. #6
    Join Date
    Oct 2017
    Posts
    16
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Cross-compile Qwt for WinCE 6

    I did it, but I can't find any problem.
    I attached the generated Makefile and the output from
    Qt Code:
    1. nmake install
    To copy to clipboard, switch view to plain text mode 
    .
    Attached Files Attached Files

  7. #7
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,247
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cross-compile Qwt for WinCE 6

    The attached output is from a build in silent mode and does not show the relevant information.

    Uwe

  8. #8
    Join Date
    Oct 2017
    Posts
    16
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Cross-compile Qwt for WinCE 6

    The output has been produced after having disabled "CONFIG += silent" in qwtbuild.pri.
    When "CONFIG += silent" was enabled, the output had less information.

    How can I produce an output with more information?

  9. #9
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,247
    Thanked 860 Times in 809 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Cross-compile Qwt for WinCE 6

    Try a "make distclean" so that the Makefile is definitely recreated and check that yout IDE does not add the silent option.

    Uwe

  10. #10
    Join Date
    Oct 2017
    Posts
    16
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Cross-compile Qwt for WinCE 6

    I tried "nmake distclean" and I verified that the Makefile is deleted.
    The Makefile is recreated when I run "c:\qt\4.8.4\bin\qmake.exe -spec c:\qt\4.8.4\mkspecs\wince60colibri-armv4i-msvc2008 qwt.pro"

    The problem is that no matter if "CONFIG += silent" in qwtbuild.pri is enabled or disabled (with a "#" character at the beggining of the line), the generated Makefile is the same.
    Is this ok?

    I run "nmake install" from a VS2008 command prompt and so I don't use a IDE. So I don't think a silent option is added.

    What else should I check?

  11. #11
    Join Date
    Oct 2017
    Posts
    16
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Cross-compile Qwt for WinCE 6

    I had to give up the "command line" way to build Qwt and examples for WinCE 6.
    In case someone is interested, I've been able to successfully build them in the follow way:
    • Windows Desktop target: open qwt.pro with QtCreator and build
    • WinCE 6 target: use VS2008 with Qt Visual Studio Add-in and open the same qwt.pro. This creates the .sln and .vcproj files that need some minor manual modifications before building

Similar Threads

  1. Qt 5 compile for WinCE 6.0, with VS 2008. IFailDialog not defined.
    By MwilsRetro in forum Installation and Deployment
    Replies: 1
    Last Post: 18th September 2015, 14:43
  2. Cross compile
    By Ichi in forum Newbie
    Replies: 9
    Last Post: 3rd April 2013, 20:49
  3. WinCE 5.0 STANDARD SDK x86 cross-compilation and work
    By kuzulis in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 24th August 2011, 18:07
  4. Strange output: Can't compile for WinCE to save my life!
    By codeslicer in forum Qt Programming
    Replies: 3
    Last Post: 20th February 2010, 14:55
  5. Cross-Compile to QT/X11 ARM
    By shiranraviv in forum Installation and Deployment
    Replies: 6
    Last Post: 18th December 2009, 11:22

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.