[HowTo] Setting Up Qt Creator for cross compile

Started by Cosik, October 27, 2014, 12:25:26 PM

Previous topic - Next topic

Cosik

This topic is continuation of this topic [HowTo] Cross compile Qt5

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.

References:
Building Qt 5 on Raspberry Pi