QT on Ben - Tutorial

Marco Castorina marco.castorina at yahoo.it
Mon May 10 14:19:08 EDT 2010

Dear all,
 sorry for the delay, but there have been few things
going on in the last few weeks [1][2]. I didn't forget
the tutorial of course, so here we go!

Step 1: follow this guide [3] to install the tool chain.
You need to add the Qt libraries to (from menuconfig
Xorg -> framework -> Qt4) to the basic configuration.

Step 2: type make and enjoy the afternoon :-)

Step 3: once the process is finished, add the path of
the mipsel compiler to the environment variables [4];

Step 4: write your Qt program;

Step 5: compile. I used the following command, but
I'm sure creating a make file is a more efficient way:

mipsel-openwrt-linux-uclibc-g++ -I <PATH TO THE TOOLCHAIN>/openwrt-xburst/staging_dir/target-mipsel_uClibc- -L<PATH TO THE TOOLCHAIN>/openwrt-xburst/staging_dir/target-mipsel_uClibc- -lQtGui -lQtCore -lpthread -ldirectfb -lfusion -ldirect -lQtNetwork -lpng -lz -lfreetype qtexample.cpp -o qtExample

Step 6: copy the executable file to the Ben (I used
the following: spc yourFileHere root at

Step 7: launch the application. Running Qt application
in an embedded environment needs a server [5], so
you need to lunch the application with the -qws
parameter (./qtexample -qws).

It should be everything. Qt uses qmake to produce
a make file and simplify the compiling process, it's
next on the ToDo list.

I wouldn't got so far without many people from the
community, everyone helped in almost every step.

If you have any question, feel free to ask!

Happy coding,


[1] http://www.irishtimes.com/newspaper/finance/2010/0329/1224269358674.html
[2] https://www.assembla.com/spaces/glendalough/documents/amhakcxfWr36fYeJe5cbLr/download/predator_render2.png
[3] http://en.qi-hardware.com/wiki/Building_Software_Image#Building_OpenWrt-image_from_source
[4] http://en.qi-hardware.com/wiki/Building_Software_Image#FAQ
[5] http://doc.trolltech.com/4.4/qt-embedded-running.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.en.qi-hardware.com/pipermail/discussion/attachments/20100510/87857588/attachment.htm>

More information about the discussion mailing list