Results 1 to 6 of 6

Thread: QT : Cross-compiling on WINDOWS to run at LINUX

  1. #1
    Join Date
    Jul 2011
    Location
    BRAZIL-RIO DE JANEIRO
    Posts
    47
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default QT : Cross-compiling on WINDOWS to run at LINUX

    Dear friends,


    I have Windows XP installed at my laptop, and due to some constraints, for while, I cannot install Linux at this laptop.
    However, immediately I must compile within this Windows environment a program to run on other embedded system, but with Linux OS.

    The reason to ask this question is the fact that I purchased a development board ( PCduino ) in which installation of QtCreator under Linux, despite be perfectly possible, would occupy almost its entire memory, and therefore the generation of executable need to be done externally at the Laptop, and then loaded into the breadboard.

    Anybody knows how to perform this cross-compilation ?


    +++

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT : Cross-compiling on WINDOWS to run at LINUX

    It's easiest if you just install a virtual Linux machine (e.g. using VirtualBox).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jul 2011
    Location
    BRAZIL-RIO DE JANEIRO
    Posts
    47
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QT : Cross-compiling on WINDOWS to run at LINUX

    Quote Originally Posted by andre_teprom View Post
    ...due to some constraints, for while, I cannot install Linux at this laptop...

    hi wysota,


    I appreciate the suggestion, but it is out of scope due to the reason explained above.
    What I need is to perform generation of Linux executable binaries under Windows environment.

    I know this cross-compilation is one of the most notorious skill of QT, and I wonder how to do that.


    +++
    Last edited by andre_teprom; 29th July 2013 at 14:59.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT : Cross-compiling on WINDOWS to run at LINUX

    Quote Originally Posted by andre_teprom View Post
    I appreciate the suggestion, but it is out of scope due to the reason explained above.
    What you explained above is that you can't install Linux on the computer. What about a virtual environment?

    What I need is to perform generation of Linux executable binaries under Windows environment.

    I know this cross-compilation is one of the most notorious skill of QT, and I wonder how to do that.
    It is highly unusual to cross-compile for Linux on Windows. People tend to do that the other way. If you really want to, you'll probably need to build the whole toolchain yourself or rely on some external toolchain someone might have built. After you have the toolchain, you'll have to cross-compile Qt using that toolchain. For that you'll need to cross-compile (or download) all libraries Qt requires. If you don't find ready binary packages it will probably take you two-three weeks to build all that yourself if you have no prior experience with cross-compiling. It is much easier to ask a friend with a Linux box to build the project for you or rent some Linux server and build the project there.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jul 2011
    Location
    BRAZIL-RIO DE JANEIRO
    Posts
    47
    Thanks
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QT : Cross-compiling on WINDOWS to run at LINUX

    Hi wysota,



    Quote Originally Posted by wysota View Post
    ...What about a virtual environment?...
    It was the first thought in my mind, but perhaps will not work, due my Laptop is INTEL X86 based core, and target platform is ARM CORTEX-A8
    Even installing some LINUX OS on both, generated executable binary will be different.

    Quote Originally Posted by wysota View Post
    ...It is highly unusual to cross-compile for Linux on Windows...
    Totally agree, but had noticed about some persons who achieved successful this task, so that it encouraged me to try at least.


    +++

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT : Cross-compiling on WINDOWS to run at LINUX

    Quote Originally Posted by andre_teprom View Post
    It was the first thought in my mind, but perhaps will not work, due my Laptop is INTEL X86 based core, and target platform is ARM CORTEX-A8
    Cross-compiling for Linux-Arm on Linux-x86 is much easier (read "trivial") than cross-compiling for Linux-arm on Windows-x86.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. cross compiling qt (linux/mingw -> windows): various undefined references
    By kaesekuchen in forum Installation and Deployment
    Replies: 0
    Last Post: 20th October 2012, 16:27
  2. Replies: 5
    Last Post: 28th February 2011, 23:37
  3. Replies: 3
    Last Post: 18th December 2010, 18:22
  4. Cross-Compiling Linux to Windows
    By xgoan in forum Qt Programming
    Replies: 10
    Last Post: 5th July 2007, 21:44
  5. Cross compiling QT3 on Linux, for win32
    By mjrich in forum Installation and Deployment
    Replies: 10
    Last Post: 6th March 2006, 19:58

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.