GUI application development for GTA02 - Which framework?
Matthias Keller
matthias.keller at tik.ee.ethz.ch
Fri Apr 17 13:34:37 CEST 2009
Hi Nicola
> Debian and gentoo offers qmake natively on the platform, mkspec does
> not need to be specialized for GTA02, but only for arm platform. OE
> offers a nice cross-compile environments for QT apps. So may you
> explain better what kind of problem do you have in developing with qt?
I was following the instructions on
http://wiki.openmoko.org/wiki/Development_with_Eclipse
At first I found out that I had to add another source to my "opkg.conf"
on my development platform:
-- 8< --
arch gstreamer 51
src/gz gstreamer
http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv4t/gstreamer
-- >8 --
Building from Eclipse was ok for projects that didn't contain any UI
designer files.
However, as I think that the UI designer is really helpful, I checked
the suggestions of the last paragraph "workaround to deal with .ui files
from Qt-Designer".
Invoking a build within Eclipse, this ended up in:
-- 8< --
/usr/local/openmoko/arm/arm-angstrom-linux-gnueabi/bin/g++
-L/usr/local/openmoko
/arm/arm-angstrom-linux-gnueabi/usr/lib -o"OpenmokoTest" ./MainWindow.o
./QtTes
t.o -lQtGui -lQtCore -lQtDBus
./MainWindow.o: In function `myMainWindow::myMainWindow(QMainWindow*)':
MainWindow.cpp:(.text+0x64): undefined reference to `vtable for
myMainWindow'
./MainWindow.o: In function `myMainWindow::myMainWindow(QMainWindow*)':
MainWindow.cpp:(.text+0xd0): undefined reference to `vtable for myMainWindow
-- >8 --
It's pretty clear why this happened: The generated file
"moc_MainWindow.cpp" had still been compiled for the host platform of
the development machine (Linux i686). Eclipse is just not checking that
there is another dependency when re-compiling anything else for ARM.
After re-compiling "moc_MainWindow.cpp" for ARM by hand everything was ok.
The problem of this approach is that "qmake" isn't set to the target
platform and can't be used in the way as it is supposed. Invoking
"moc-qt4" and recompiling "moc_*.cpp" by hand is definitely not the idea
of the qmake build system.
However, I was no longer sure if it is really reasonable to use Qt for
Openmoko development. In particular, this wiki page doesn't look like if
anyone really uses it.
> I started a wiki page at
> http://wiki.openmoko.org/wiki/Developing_with_C%2B%2B_and_Qt , I will
> happy to add some hints for your needs.
This is really great! I just checked out the devshell, it basically
worked out-of-the-box (the only minor change was to replace "alias
./configure=.." with "alias configure=.." in the devshell script on
Ubuntu 8.10).
I guess that "http://wiki.openmoko.org/wiki/Development_with_Eclipse"
definitely should be updated. Your solution is working, however, I could
not distinguish from the beginning which of the different pages about Qt
development is the best/the working one. This should be pointed out more.
Having an improved script for UI designer files is just another hack,
maybe it would be best to recommend that the people should install the
devshell first and then include this in their Eclipse profile if they
want to use it?!
By now, I did not dare to change anything in the wiki as I've no clue
about the policies that are in place. Is it ok to just change things, or
should I contact someone like the owner of a particular document first?
Cheers,
Matthias
--
ETH Zürich, Matthias Keller, Institute TIK
ETZ G 76, Gloriastrasse 35, 8092 Zürich
Tel +41 44 632 70 41, http://www.tik.ee.ethz.ch/~kellmatt
More information about the devel
mailing list