Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: Cosik on October 27, 2014, 12:25:26 pm

Title: [HowTo] Setting Up Qt Creator for cross compile
Post by: Cosik on October 27, 2014, 12:25:26 pm
This topic is continuation of this topic [HowTo] Cross compile Qt5 (https://www.olimex.com/forum/index.php?topic=3825.0)

You could configure yours Qt Creator in those steps

Start Qt Creator.
Bring up the options dialog using Tools -> Options....
Select the Devices page on the left.
Click Add...
Select Generic Linux Device and click Start Wizard.


Enter the name of the device.
Enter the IP address for your board.
Enter "olimex" for the username (some times you need to run yours program as a root).
Enter "olimex" for the password.


Select the Build & Run page on the left.
Select the Compilers tab.
Using the Add button, add a GCC compiler.
Name the compiler for example "A20 Lime".
Set the path to the toolchain arm-linux-gnueabihf-g++


Select the Qt Versions tab.
Using Add... add a new Qt version.
Select the path to the appropriate qmake: "/opt/qt5.3.2olim2/bin/qmake".


Select the Kits tab.
Click Add button to add a kit.
Enter name e.g. "A20-Lime
Select Generic Linux Device and Raspberry Pi for device type and device.
Enter "/mnt/a20" for the sysroot
Select Toolchain for the compiler.
Browse to yours cross compiler arm-linux-gnueabihf-gdb for the debugger.
Select qt for the Qt Version.
Click OK to finalize the configuration.


In new project it's necessary to add two lines to qt project file:
target.path = /home/olimex
INSTALLS += target

target.path - determinate where your program will be installed on target.

Building Qt 5 on Raspberry Pi (http://www.ics.com/blog/building-qt-5-raspberry-pi#.U0ubso_7sYy)