PDA

View Full Version : QT : Cross-compiling on WINDOWS to run at LINUX



andre_teprom
26th July 2013, 18:12
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 (http://www.pcduino.com/)) 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 ?


+++

wysota
29th July 2013, 11:57
It's easiest if you just install a virtual Linux machine (e.g. using VirtualBox).

andre_teprom
29th July 2013, 13:35
...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.


+++

wysota
29th July 2013, 16:01
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.

andre_teprom
17th August 2013, 15:17
Hi wysota,




...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.


...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.


+++

wysota
18th August 2013, 15:57
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.