Results 1 to 2 of 2

Thread: Static build of Qt-embedded applications

  1. #1
    Join Date
    Dec 2009
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Static build of Qt-embedded applications

    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:

    Qt Code:
    1. /home/cloud/ev-sdk/rootfs/armle-fs/lib//libQtCore.a(qfsfileengine_unix.o): In function `QFSFileEngine::owner(QAbstractFileEngine::FileOwner) const':
    2. 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
    3. 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
    4. /home/cloud/ev-sdk/rootfs/armle-fs/lib//libQtGui.a(qapplication_qws.o): In function `QWSDisplay::Data::flushCommands()':
    5. qapplication_qws.cpp:(.text+0x9cc): undefined reference to `QAbstractSocket::flush()'
    6. /home/cloud/ev-sdk/rootfs/armle-fs/lib//libQtGui.a(qapplication_qws.o): In function `QWSDisplay::Data::flush()':
    7. qapplication_qws.cpp:(.text+0xa28): undefined reference to `QAbstractSocket::flush()'
    8. /home/cloud/ev-sdk/rootfs/armle-fs/lib//libQtGui.a(qapplication_qws.o): In function `QWSDisplay::Data::~Data()':
    9. qapplication_qws.cpp:(.text+0x282c): undefined reference to `QAbstractSocket::flush()'
    10. /home/cloud/ev-sdk/rootfs/armle-fs/lib//libQtGui.a(qapplication_qws.o): In function `QWSDisplay::Data::~Data()':
    11. qapplication_qws.cpp:(.text+0x2b28): undefined reference to `QAbstractSocket::flush()'
    12. /home/cloud/ev-sdk/rootfs/armle-fs/lib//libQtGui.a(qapplication_qws.o): In function `QWSDisplay::Data::waitForQCopResponse()':
    13. qapplication_qws.cpp:(.text+0x9110): undefined reference to `QAbstractSocket::flush()'
    To copy to clipboard, switch view to plain text mode 

    Any help will be very appreciated.

    Many thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Static build of Qt-embedded applications

    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?
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. Moving from QT 4.5 shared build to QT 4.5.2 static build
    By extrakun in forum Qt Programming
    Replies: 0
    Last Post: 26th October 2009, 09:49
  2. Replies: 11
    Last Post: 13th July 2009, 16:05
  3. Replies: 16
    Last Post: 23rd May 2008, 10:12
  4. Please Help-->have few doubts with Static build in Windows !
    By Krish in forum Installation and Deployment
    Replies: 1
    Last Post: 17th March 2008, 14:37
  5. Windows XP Qt 4.3.2 Static build
    By maxpower in forum Installation and Deployment
    Replies: 9
    Last Post: 2nd November 2007, 04:49

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.