3

So I will start off by saying that I do NOT want know how to setup or run QT on the pi. I am specifically trying to setup Qt Creator 4.0.3 (Based on Qt 5.7.0 (MSVC 2013, 32 bit)) to write and compile C++ and the run it on the Raspberry pi 2. I have found that running qt on the pi is far to slow.

I have searched for two days to find the right toolchain download for qt/raspberry and its corresponding qt configuration. Nothing seems to work. I have found what seems like a thousand dead ends searching the web. I can write and compile apps for windows console fine. But finding information to cross compile for raspberry seems to be an elusive Unicorn!

Does anyone have this working??? If so which of the many toolchains did you use? And please help me replicate your QT configuration. The closest I have come is using the GCC ARM Embedded toolchain but I cant seem to get the QT options set correctly and I believe that only gets me part of the way there. My ultimate goal is to control GPIO and use the RadioHead library.

Thanks in advance!

joecoder
  • 31
  • 4
  • 'then run it on the Raspberry pi 2' is not that specific, because there is at least raspbian, ubuntu mate and fedora for raspberry, and probably each with different versions i.e. the compiler and library version may be different. – J.J. Hakala Jul 22 '16 at 08:49
  • For now I would like to get something simple working. Hello world on my Jessie Pi 2. – joecoder Jul 22 '16 at 22:08
  • This [windows toolchain](http://sysprogs.com/files/gnutoolchains/raspberry/raspberry-gcc4.9.2-r2.exe) from [gnutoolchains](http://gnutoolchains.com/raspberry/) is probably a close match for raspberry pi 2 / debian jessie. – J.J. Hakala Jul 23 '16 at 15:25

1 Answers1

0

I also wanted to do that, and I actually achieved it, It's called "cross-compilation", you build on the Main PC and then compile it to the target. Initially I wanted to use my main PC with windows 10, but I ended creating a linux partition on my pc to do it since I didn't found any way to do it with windows.

Qt has a very comprehensive tutorial with Qt5 and RaspberryPi2 (both with linux), the only problem is you need linux on your pc to do it. If you want to do this I would suggest following this steps:

  1. Create a linux partition with the same os as in the pi (for example raspbian and debian) and name the username (in linux) "pi" and the password "raspberry". This will help you with external libraries.
  2. Install Qt for Linux on your new partition
  3. Follow Qt's tutorial on https://wiki.qt.io/RaspberryPi2EGLFS

The tutorial is really straightforward, I really recommend it. Good Luck.