PDA

View Full Version : Static build of Qt-embedded applications



cloud
15th December 2009, 15:43
Hi all,

I'm trying to cross-compile an application statically linked to Qt-Embedded (open-source license).
My host is Ubuntu Linux 32-bit on a PC. My target is Linux running on a ARM9.

I dowloaded Qt-embedded and built them using:

./configure -release -static -no-largefile -no-accessibility -embedded arm -xplatform qws/linux-arm-g++ -prefix <destinazione> -little-endian -no-mmx -no-3dnow -no-sse -no-sse2 -opensource -no-qt3support -no-webkit -no-openssl -silent -no-cups -no-opengl -qt-gfx-linuxfb

This is supposed to build a static version of QT libraries, isn't it ?

Then, I modified the mkspecs/common/g++.conf file, adding -static to QMAKE_LFLAGS.

However, when compiling the application, I get several errors:



/home/cloud/ev-sdk/rootfs/armle-fs/lib//libQtCore.a(qfsfileengine_unix.o): In function `QFSFileEngine::owner(QAbstractFileEngine::FileOwn er) const':
qfsfileengine_unix.cpp:(.text+0x7e4): warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
qfsfileengine_unix.cpp:(.text+0x6a0): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/cloud/ev-sdk/rootfs/armle-fs/lib//libQtGui.a(qapplication_qws.o): In function `QWSDisplay::Data::flushCommands()':
qapplication_qws.cpp:(.text+0x9cc): undefined reference to `QAbstractSocket::flush()'
/home/cloud/ev-sdk/rootfs/armle-fs/lib//libQtGui.a(qapplication_qws.o): In function `QWSDisplay::Data::flush()':
qapplication_qws.cpp:(.text+0xa28): undefined reference to `QAbstractSocket::flush()'
/home/cloud/ev-sdk/rootfs/armle-fs/lib//libQtGui.a(qapplication_qws.o): In function `QWSDisplay::Data::~Data()':
qapplication_qws.cpp:(.text+0x282c): undefined reference to `QAbstractSocket::flush()'
/home/cloud/ev-sdk/rootfs/armle-fs/lib//libQtGui.a(qapplication_qws.o): In function `QWSDisplay::Data::~Data()':
qapplication_qws.cpp:(.text+0x2b28): undefined reference to `QAbstractSocket::flush()'
/home/cloud/ev-sdk/rootfs/armle-fs/lib//libQtGui.a(qapplication_qws.o): In function `QWSDisplay::Data::waitForQCopResponse()':
qapplication_qws.cpp:(.text+0x9110): undefined reference to `QAbstractSocket::flush()'


Any help will be very appreciated.

Many thanks.

axeljaeger
8th January 2010, 11:29
You should not need to modify the mkspec. Passing -static to configure is enough. It will be inherited to your applications makefile as well. The error messages look like there is no QtNetwork.a. Do you have one?