Qt-embedded-interest Archive, March 2007
QChar and Q_PACKED
Message 1 in thread
Hi all,
I am having a hard time building a working qt/embedded 3.3.7 for arm.
This is my environment:
arm-xscale-linux-gnu-g++ 4.0.2
arm linux kernel version 2.6.20.1
glibc 2.3.6
I have configured Qt/E with:
./configure -DQT_QLOCALE_USES_FCVT -no-gif -static -embedded arm -thread
-depths 16 -qt-gfx-vnc -qt-kbd-tty -no-freetype -disable-xml
-disable-opengl -disable-sql -disable-workspace -disable-canvas
-disable-iconview
The build fails because the compiler doesnt like references to members
in packed structs (i guess). This is the error message:
cd src && gmake
gmake[2]: Entering directory `/home/developer/qt-embedded-free-3.3.7/src'
arm-linux-g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2
-D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_QLOCALE_USES_FCVT
-DQT_THREAD_SUPPORT -DQT_NO_CUPS -DQT_NO_NIS -DQT_NO_FREETYPE
-DQT_NO_STYLE_MAC -DQT_NO_STYLE_AQUA -DQT_NO_STYLE_INTERLACE
-DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_COMPACT -DQT_NO_STYLE_POCKETPC
-DQT_NO_QWS_VFB -DQT_NO_QWS_VGA16 -DQT_NO_QWS_TRANSFORMED
-DQT_NO_QWS_SNAP -DQT_NO_QWS_MACH64 -DQT_NO_QWS_VOODOO3
-DQT_NO_QWS_MATROX -DQT_NO_QWS_SHADOWFB -DQT_NO_QWS_REPEATER
-DQT_NO_QWS_KBD_SL5000 -DQT_NO_QWS_KBD_USB -DQT_NO_QWS_KBD_YOPY
-DQT_NO_QWS_KBD_VR41 -DQT_NO_QWS_MOUSE_BUS -DQT_NO_QWS_MOUSE_LINUXTP
-DQT_NO_QWS_MOUSE_VR41 -DQT_NO_QWS_MOUSE_YOPY
-I/home/developer/qt-embedded-free-3.3.7/mkspecs/qws/linux-arm-g++ -I.
-I3rdparty/freetype2/include -I3rdparty/libmng -I3rdparty/libjpeg
-I3rdparty/libpng -I3rdparty/zlib -I../include
-I.moc/release-static-mt-emb-arm/ -o
.obj/release-static-mt-emb-arm/allmoc.o
.moc/release-static-mt-emb-arm/allmoc.cpp
../include/qstring.h: In member function 'ushort& QChar::unicode()':
../include/qstring.h:199: error: cannot bind packed field
'((QChar*)this)->QChar::ucs' to 'ushort&'
../include/qjpunicode.h: At global scope:
../include/qjpunicode.h:82: warning: 'class QJpUnicodeConv' has virtual
functions but non-virtual destructor
../include/qpolygonscanner.h:48: warning: 'class QPolygonScanner' has
virtual functions but non-virtual destructor
../include/private/qgfxdriverinterface_p.h:62: warning: 'struct
QGfxDriverInterface' has virtual functions but non-virtual destructor
../include/private/qkbddriverinterface_p.h:62: warning: 'struct
QKbdDriverInterface' has virtual functions but non-virtual destructor
../include/private/qmousedriverinterface_p.h:62: warning: 'struct
QMouseDriverInterface' has virtual functions but non-virtual destructor
../include/private/qstyleinterface_p.h:66: warning: 'struct
QStyleFactoryInterface' has virtual functions but non-virtual destructor
../include/private/qtextcodecinterface_p.h:69: warning: 'struct
QTextCodecFactoryInterface' has virtual functions but non-virtual destructor
../include/private/qwidgetinterface_p.h:74: warning: 'struct
QWidgetFactoryInterface' has virtual functions but non-virtual destructor
./kernel/qfontmanager_qws.h:177: warning: 'class QCachePolicy' has
virtual functions but non-virtual destructor
./kernel/qfontmanager_qws.h:188: warning: 'class QDefaultCachePolicy'
has virtual functions but non-virtual destructor
../include/qwindowsystem_qws.h:223: warning: 'class
QWSServer::KeyboardFilter' has virtual functions but non-virtual destructor
gmake[2]: *** [.obj/release-static-mt-emb-arm/allmoc.o] Fehler 1
gmake[2]: Leaving directory `/home/developer/qt-embedded-free-3.3.7/src'
gmake[1]: *** [sub-src] Fehler 2
gmake[1]: Leaving directory `/home/developer/qt-embedded-free-3.3.7'
gmake: *** [init] Fehler 2
So i removed the Q_PACKED from the declaration of QChar in qstring.h.
The build then succeeds, but richtext is not working. The richtext
example just shows the string (including the tags) as plain text.
What am i missing here? Does the richtext engine expect a certain memory
alignment for QChars members or something?
I am really off track here.
Best regards,
Andre
To unsubscribe - send "unsubscribe" in the subject to qt-embedded-interest-request@xxxxxxxxxxxxx