sachusanal,
OK, it seems we have a problem here. Recently PeterO tried using the Qt5 packages from twolife and also could not make it work. I did not realize it was broken (or perhaps we are missing some vital instructions about it). So lets forget about two life.
That leaves going back to building qt5 from sources.
The steps I took to do that were as follows:
The aim here is to be able to build GUI apps using Qt5 that run in the frame buffer of the Raspberry Pi or under X and use GLES.
The motivation for wanting to use the frame buffer is that X on the Pi is rather slow and ultimately one wants to use webgl in a QT webview which seems to be the only way that is ever going to happen.
If you would like a ready to use Qt5.2 package see below.
Having tried and failed building Qt5 from various different instructions I finally found a recipe that actually works:
http://qt-project.org/wiki/Native_Build ... spberry_Pi
Be warned this build takes a long time!
Getting it to work successfully required:
1) Put all the working files on an external USB hard drive.
2) Set the amount of memory set aside for graphics on the Pi as small as possible.
3) Use a swap file on the hard drive.
Or use the package I built.
The complete Qt5.2 package ready to use is posted to DropBox and can fetched and installed as follows:
$ wget
https://dl.dropboxusercontent.com/u/812 ... .2-rpi.tgz
$ tar xvzf qt5.2-rpi.tgz$ rm qt5.2-rpi.tgz
$ sudo mv qt5 /opt
$ ln -s /opt/qt5 /usr/local/qt5
You will need to set some environment variables, This can be done by adding the following to /etc/profile or your ~/.bashrc file.
$ export PATH=${PATH}:/usr/local/qt5/bin
$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/qt5/lib
$ export QT_PLUGIN_PATH=/usr/local/qt5/plugins
Do check your raspi's memory split. Qt will need 64MB or so to give it some room.
The suggested test of building the Qt's OpenGL cube demo worked as advertised just qmake and make in the cubes project directory.
To run Qt apps under X Windows specify the fcb platform plugin
$ myApp -platform xcb
To run directly into the frame buffer, no X Windows required, use the eglfs plugin:
$ myApp -platform eglfs
Thanks to lpcamargo for testing this and suggesting corrections to the setup procedure. He has blogged about it in Portuguese here (Chrome translates this to English nicely):
http://lpcamargo.blogspot.com.br/2014/0 ... rrypi.html
Memory in C++ is a leaky abstraction .