2

I saw many threads about setting up Qt on Rpi v.1. RPi 2 is using ARMv7 architecture so probably toolchain for ARMv6 won't work like described here

Additionally I would like to compile from Windows, is there any suitable cross-compiler for it?

3 Answers3

2

Anything compiled for ARMv6 should work on the RPi2.

Raspbian is still based on ARMv6 and the tool chain I use to remotely develop for the Pi 2 is the one I use for earlier Pi models.

joan
  • 67,803
  • 5
  • 67
  • 102
1

Looks to me like Qt 4 is available pre-compiled in Raspbian jessie, as is KDE 4, which uses it extensively. So you should not have to build the whole thing unless you are trying to customize it.

WRT a windows cross-compiler, I don't use windows but for ARMv6 I use crosstool-ng, which is available for the Windows. I'd guess you'd need ming-gw too.

Note that since ARMv7 cross-compilers are much easier to come by, you might try that. I'm not sure if the resulting binaries will work on an ARMv6 userland, but as a guess they might. They certainly work on a Pi 2 with an ARMv7 userland.

The current ARMv7 distros are Snappy Core Ubuntu and the Fedora 21 remix. Fedora, and I would presume Ubuntu, have all the Qt 4 and 5 binaries.

goldilocks
  • 56,430
  • 17
  • 109
  • 217
0

I work with the same program QT on RPI1 and RPI2 cross compiled from my linux VM with QT creator, Anything compiled for ARMv6 should work ...

I use linux for cross compile with a specific toolchain for ARM : https://github.com/raspberrypi/tools/tree/master/arm-bcm2708 (gcc-linaro)

You can consider to use Ming-GW or cygWin to compile this toolchain on Windows, some help here about the linaro toolchain : https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/share/doc/gcc-linaro-arm-linux-gnueabihf-raspbian or you can download directly a compiled version here : https://releases.linaro.org/14.04/components/toolchain/binaries/

I have used this method for cross compiling on linux : http://www.ics.com/blog/building-qt-and-qtwayland-raspberry-pi