How to arm cross-compile in windows for Linux ?



  • Hello,

    I try to cross-compile for arm a QT 4.8.1 application in windows machine for linux machine.
    I have found the following link:
    "http://visualgdb.com/tools/QtCrossTool/":http://visualgdb.com/tools/QtCrossTool/
    Which described how this can be done.
    I would like to ask:

    What is the meaning of the remote machine ? I don't have a remote machine on this computer from where I compile ? Is it required ?
    Is the above method from the link is recommended or there is a better way ?

    Thank you,
    Ran



  • "remote machine" refers to the board, in this case the Raspberry Pi.



  • Hi,

    On trying to select the "remote machine" it opens ssh connection. Why should I connect to remote machine ? Is the above method the best way to do cross compile for arm ?


  • Lifetime Qt Champion

    Hi,

    Because you are building an application to run on said remote machine, in this example the Raspberry PI so the remote machine is needed to run/debug your application and also needed to deploy the Qt libraries on to be able to run/debug your application. All ARM devices don't run the same OS and in the case of Linux not all are running the same distribution so you can't just have a one binary fits all.



  • Hi,

    Thanks for the reply. I probably did not clear what I try to do....
    I already installed target with lib for qt 4.8.1 and I have the ability to cross- compile application for arm running in Linux. The thing now, is that I am in dillema: I need to provide windows's user thecapability to compile the QT for arm (running on Linux), so I have 2 options:

    1. provide virtual machine with this arm cross-compilation capability as I already have in my laptop.
      2, use some method for cross compile to arm on Windows machine.
      I thought that option 2 will be better (because I deal with windows software group, and they rather not use Linux), but it turns out to be complex task. I still don't understand how this should be done. I found no information about it.

    Are you familiar with and wiki/blog which explains clearly how I can achieve option 2 or Do you think I better stick with option 1 ?
    Are all cross compilers for arm valid for this purpose (raspberry PI / beaglebone /codesourcery etc)
    Regards,
    Ran


  • Lifetime Qt Champion

    I'd go with the Linux virtual machine: way simpler to setup that environment



  • Hello,

    When compiling the project in windows can we use any Qt sdk & qt creator or should it be the same qt sdk installed (4.8.1 in my case) ?
    As I said the method of development is:

    1. using windows for testing
    2. compiling in linux machine for the target

    Thanks,
    Ran


  • Lifetime Qt Champion

    Well, in the absolute you should be using the same Qt version as your target to ensure that you have the same set of feature/patches/bugfixes. Qt Creator can be the latest version, it can handle several version of Qt without any problem.

    You should rather do everything in your linux virtual machine, you'll gain time



  • Hi,

    Thanks very much,
    I would like to ask one more question, if I may.

    The general idea in our developments with QT is :

    1. use windows for all compile/debug/testing of the QT project.
    2. copy the project to linux, and cross-compile it for the ARM target under Linux.
    3. running the application in the ARM target.

    What do you mean by "gain time" if we will do everything in Linux ? Do you find any problem in the method above ?

    Thanks,
    Ran


  • Lifetime Qt Champion

    If you use linux for both the development and deployment on your arm device then you can use tools to debug/analyze your code as well as your device that should be on par with what your desktop proposes. In short: same debugger, same set of libraries, same environment and/or technologies


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.