Results 1 to 6 of 6

Thread: QT static compilation - not including sql

  1. #1
    Join Date
    Oct 2008
    Posts
    306
    Thanks
    6
    Thanked 9 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Exclamation QT static compilation - not including sql

    I attempted to build QT as static, I used the following for ./configure (sample found in tutorial):

    Qt Code:
    1. ./configure -release -opensource -static -platform linux-g++ -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -nomake examples -no-nis -no-cups -no-gtkstyle -no-opengl -no-openvg -no-glib -nomake tests
    To copy to clipboard, switch view to plain text mode 

    When trying to run a app configured as
    Qt Code:
    1. CONFIG += console
    2. CONFIG -= app_bundle
    3. CONFIG += static
    To copy to clipboard, switch view to plain text mode 
    but it fails to run in a environment without QT installed, failing with:

    Qt Code:
    1. error while loading shared libraries: libQt5sql.so.5: cannot open shared object file: No such file or directory
    To copy to clipboard, switch view to plain text mode 

    Is my ./configure wrong, or is it the .pro config?

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: QT static compilation - not including sql

    Did you do this when building your application?

  3. #3
    Join Date
    Oct 2008
    Posts
    306
    Thanks
    6
    Thanked 9 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QT static compilation - not including sql

    I tried adding the QTPLUGIN, but still won't work. Here is the project I'm trying to compile as static: https://github.com/pindamonhangaba/J...kat/japkat.pro

  4. #4
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: QT static compilation - not including sql

    Just a guess, but does QTPLUGIN.platform = qminimal perhaps override what you have specified in the line above? Try building w/o this line and see if that works.

  5. #5
    Join Date
    Oct 2008
    Posts
    306
    Thanks
    6
    Thanked 9 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QT static compilation - not including sql

    Doesn't change, I even recompiled QT with the -plugin-sql-sqlite option, but it still doesn't static link the sql lib.

  6. #6
    Join Date
    Oct 2008
    Posts
    306
    Thanks
    6
    Thanked 9 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QT static compilation - not including sql

    Ok, I had several Qt versions available ad wasn't pointing to the static one. Qt Creator should warn when .pro is configured for static, but the Qt version isn't.

Similar Threads

  1. About QT5.2 Static Compilation
    By zRyan in forum Newbie
    Replies: 1
    Last Post: 19th February 2014, 20:19
  2. Including a static library
    By jepessen in forum Newbie
    Replies: 3
    Last Post: 6th May 2011, 09:35
  3. plugins not recognized for static compilation
    By timmu in forum Qt Programming
    Replies: 3
    Last Post: 28th February 2011, 13:43
  4. Error in static compilation of Qt 2010.05!
    By elton.lika in forum Newbie
    Replies: 5
    Last Post: 26th January 2011, 21:37
  5. compilation error when including dumpcpp output
    By Jimmy2775 in forum Qt Programming
    Replies: 13
    Last Post: 14th May 2010, 04:12

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.