Hi all I'm a bit confused over what to compile/install to get the latest version of QT. After installing the updates (from the News forum, update 2010-11-21), and using the linux-image, what version of QT do I actually have installed ? The reason I ask is because I put fprintf(stderr, "QT version: %s\n", qVersion()); into my code, and it prints out 'QT version 2.3.12'. I thought I'd be getting 4.6 or there-abouts. Similarly, for my cross-compiler, I was using arm-qtopia-20101105.tar.gz and x86-qtopia-20100420.tar.gz. Ought I be using the x86-qte-... and arm-qte-... instead ? Cheers, Simon
QT and qTopia versions
Simon, Check here for info: http://lists.trolltech.com/qt-interest/2003-09/thread00073-0.html The path to $QTDIR/include/qglobal.h will vary depending on which environment variables you have set up. When I am compiling my environment variableS point QTDIR as follows: X11: /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/dqt. ARM: /opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2. In the qtopia-2.2.0-FriendlyARM directory there are several subdirectories. Among them are dqt and qt2. If I open the qglobal.h file in the ../include subdirectory for each path I get the following results: ...dqt/include/qglobal.h: #define QT_VERSION_STR "3.3.5" ...qt2/include/qglobal.h: #define QT_VERSION_STR "2.3.12" If I enter "$ which qmake" for either environment I get the following: For x11 (x86): /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/bin/qmake For arm: /opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/bin/qmake But for either one "$ qmake -v" returns: Qmake version: 1.06c-Qtopia (Qt 3.2.1) So now I have three different qt versions on my machine just from the FriendlyARM download and install: 2.3.12, 3.2.1, and 3.3.5. If I open a Makefile from a project for either platform I get the following: For ARM: MOC = /opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/moc UIC = /opt/FriendlyARM/mini2440/arm-qtopia/qtopia-2.2.0-FriendlyARM/qt2/bin/uic For X11: MOC = $(QTDIR)/bin/moc UIC = $(QTDIR)/bin/uic Where QTDIR = /opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/dqt What this tells me is that, for the default environment variable settings, if you compile for X11 you will get QT version 3.3.5, but if you compile for the ARM you will get QT version 2.3.12. They must have grabbed qmake from QT version 3.2.1, but the qmake version AFAIK doesn't determine your final compile version. It's the libraries that are called in during the compile that counts. One more thing. The arm-qtopia path also has a dqt directory. This would imply that you can compile ARM projects with QT 3.2.1 also. I haven't tried pointing my QTDIR to this path yet, but I am looking into doing this soon. Hope this helps. James
Thanks James, I sort of figured it out by browsing enough websites, and now I'm running with QT 4.7 on the 7" LCD. I've been making a log of what I'm doing at http://tank-log.com/ if anyone is interested :) Simon