[QtonPi] Mouse support

Floris Bos / Maxnet bos at je-eigen-domein.nl
Sat Jun 16 22:44:17 CEST 2012


On 06/14/2012 01:51 PM, Coley wrote:
> I've tried compiling Qt5 from git so I could install its output into 
> the SDK but I'm failing with no -lGL.
> Where can I get a suitable libGL to link against?

Can grab the OpenGL ES libraries from the rPi firmware git repo.


My own notes for generating an environment on my desktop to 
cross-compile applications for a Pi running Wheezy:

==
# Grab tools (for the cross-compiler toolchain) and firmware (for the 
OpenGL libs) from the rPi github

git clone https://github.com/raspberrypi/tools.git --depth=1
git clone https://github.com/raspberrypi/firmware.git --depth=1

# Copy OpenGL stuff to toolchain's sysroot

cp -a firmware/opt 
tools/arm-bcm2708/linux-x86/arm-bcm2708-linux-gnueabi/sys-root

# Workaround for some EGL include files being in a directory were other 
code doesn't expect them to be

cp 
tools/arm-bcm2708/linux-x86/arm-bcm2708-linux-gnueabi/sys-root/opt/vc/include/interface/vcos/pthreads/*tools/arm-bcm2708/linux-x86/arm-bcm2708-linux-gnueabi/sys-root/opt/vc/include/interface/vcos

# Grab Qt

git clone https://git.gitorious.org/qt/qt5.git qt5 --depth=1
cd qt5
./init-repository --no-webkit

# Configure and compile.

./configure -prefix /opt/qt50-snapshot -hostprefix $PWD/../qmake_for_pi 
-release -device linux-rasp-pi-g++ -device-option 
CROSS_COMPILE=$PWD/../tools/arm-bcm2708/linux-x86/bin/arm-bcm2708-linux-gnueabi- 
-sysroot 
$PWD/../tools/arm-bcm2708/linux-x86/arm-bcm2708-linux-gnueabi/sys-root 
-device-option DISTRO=wheezy -opensource -confirm-license -nomake 
examples -nomake tests -optimized-qmake -reduce-relocations -reduce-exports

./build -j 3

# Copy mkspecs folder to the sysroot. Qt Creator 2.5 expects them to be 
there, and will throw a "The default mkspec symlink is broken" error 
otherwise

cd ..
cp -a qmake_for_pi/mkspecs 
tools/arm-bcm2708/linux-x86/arm-bcm2708-linux-gnueabi/sys-root/opt/qt50-snapshot
==



To cross-compile applications: in Qt Creator 2.5, go to menu "tools" -> 
"options" -> "Build & Run"

Tab "toolchains" add: 
/YOURFOLDER/tools/arm-bcm2708/linux-x86/bin/arm-bcm2708-linux-gnueabi-gcc
Tab "Qt versions" add: /YOURFOLDER/qmake_for_pi/bin/qmake

Under "Linux "devices" add the SSH login details of your Pi.

And specify the remote folder on the Pi your application should be 
uploaded to in your projects' .pro file, like this:

==
target.path = /tmp
INSTALLS += target
==


Yours sincerely,

Floris Bos



More information about the QtonPi mailing list