Results 1 to 4 of 4

Thread: Static linking with Qt

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Dec 2006
    Posts
    426
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    8
    Thanked 18 Times in 17 Posts

    Default Re: Static linking with Qt

    Quote Originally Posted by prykHetQuo View Post
    Can we explicitly specify at make or qmake the static library files we want to link?
    In Linux, if you just say -lfoo, the linker will look for libfoo.so first, if not found, then it looks for libfoo.a. From your ldd outputs, you have dynamic Qt libraries in the path...

    You can force it to link to static one using -Wl,-Bstatic as

    LIBS += -Wl,-Bstatic -lfoo

    Then it will pick up static first. Try to play with your pro file, you should be able to figure it out...

  2. The following user says thank you to lni for this useful post:

    Ade Malsasa Akbar (3rd June 2013)

Similar Threads

  1. problem on static linking in Linux.
    By anupamgee in forum Installation and Deployment
    Replies: 1
    Last Post: 29th May 2009, 13:45
  2. Static linking of Qt programs
    By divya balachandran in forum Qt Programming
    Replies: 0
    Last Post: 15th September 2008, 12:10
  3. Replies: 16
    Last Post: 23rd May 2008, 10:12
  4. Qt 4.3 static linking on Windows
    By john_crichton in forum Installation and Deployment
    Replies: 2
    Last Post: 13th May 2008, 06:57
  5. Replies: 4
    Last Post: 20th February 2006, 09:11

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
  •  
Qt is a trademark of The Qt Company.