Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Static
Qt 6.11 is out! See what's new in the release blog

Static

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    ghleclerc
    wrote on last edited by
    #1

    Hello,

    I am trying to build Qt statically on OS X. Here is the command I use

    ../../srcs/qt/configure --prefix=/sw/local/qt/
    -release
    -opensource
    -confirm-license
    -c++11
    -static
    -qpa cocoa
    -nomake examples
    -nomake tests
    -no-compile-examples
    -skip qtconnectivity
    -skip qtandroidextras
    -skip qtlocation
    -skip qtwebchannel
    -skip qtwebengine
    -skip qtwebsockets
    -skip qtsvg
    -skip qtenginio
    -skip qtdeclarative
    -skip qtserialport
    -skip qtmultimedia
    -skip qtscript
    -skip qtquick1
    -no-largefile
    -no-qml-debug
    -no-journald
    -no-cups
    -no-iconv
    -no-dbus
    -no-sql-psql
    -no-wayland
    -no-harfbuzz
    -no-xcb
    -no-opengl
    -no-gtkstyle
    -no-pulseaudio
    -no-glib
    -no-xcb-xlib
    -no-alsa
    -qt-sql-sqlite
    -qt-zlib
    -qt-pcre
    -qt-freetype
    -qt-libjpeg
    -qt-libpng

    As you can guess, our needs are small. We deactivate most features (I think). We really only need the Widgets/GUI library to build our application. For most of the rest, we prefer to rely on the STL and hand-coded stuff (with the good and the bad that entails).

    Now, at the end of the configure process, it says :

    WARNING: Using static linking will disable the use of dynamically
    loaded plugins. Make sure to import all needed static plugins,
    or compile needed modules into the library.

    I would very much like to compile needed modules into the library, I just don't know how to go about it. Can someone hint me towards a solution.

    In advance, thanks.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      It depends on what you will use, see for example the SQL related plugins. You can either use the -plugin-sql-mysql or -qt-sql-mysql. The second option will make the support built-in.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • G Offline
        G Offline
        ghleclerc
        wrote on last edited by
        #3

        Thanks (again).

        From that answer, I gather that the options that I give at compile time (e.g. -qt-sql-sqlite -qt-zlib -qt-pcre -qt-freetype -qt-libjpeg -qt-libpng) are using built-in support and thus are OK for my static library use case.

        If this is incorrect, please let me know.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Nop, looks good.

          Don't forget to also use Q_IMPORT_PLUGIN and its friends when building your application.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved