Results 1 to 2 of 2

Thread: Qt 4.7.4 Static Link for Linux Info

  1. #1
    Join Date
    Nov 2010
    Posts
    122
    Thanks
    62
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Wink Qt 4.7.4 Static Link for Linux Info

    There are plenty of legacy articles on static linking for a Qt application under Linux. I have read that the Qt libraries have to be rebuilt from source for static linking, and that they do not.

    I have read you simply have to add "CONFIG += static" to the .pro file, but this does not work for me in Qt Creator. The ldd command and file size indicates I am still linking dynamically.

    Has anyone successfully performed static linking of a Qt application (for example a console app) using a recent version of the Qt source/libraries under Linux? (say v4.7.4)

    I currently have v4.7.4 installed and managed via the Qt SDK Maintenance Tool.

    What is the current methods for the recent versions of the libraries.

    Thanks in advance

  2. #2
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: Qt 4.7.4 Static Link for Linux Info

    You should rebuild Qt from sources as static lib. And then link your app with it. This wiki page is quite actual.
    Oleg Shparber

Similar Threads

  1. Static link
    By bu7ch3r in forum Qt Programming
    Replies: 0
    Last Post: 29th November 2011, 13:42
  2. examples - static link
    By fukjo in forum Qwt
    Replies: 1
    Last Post: 14th July 2011, 17:23
  3. How to link static
    By Max123 in forum Qt Programming
    Replies: 9
    Last Post: 2nd April 2010, 20:36
  4. How to static link in 4.6. on Mac OS 10.5?
    By Markus in forum Qt Programming
    Replies: 3
    Last Post: 6th February 2010, 22:24
  5. How to link it static?
    By Ashitaka in forum Qt Programming
    Replies: 1
    Last Post: 29th July 2006, 16:38

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.