Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Enable QML Plugins in static builds
Forum Updated to NodeBB v4.3 + New Features

Enable QML Plugins in static builds

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 947 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.
  • Z Offline
    Z Offline
    zansara
    wrote on last edited by
    #1

    Hello everyone,

    I am trying to deploy a small QML-based application which uses a custom QML Plugin. The application works fine as long as I build it with QtCreator, both in debug and release mode. However, I want to deploy the app as a statically linked executable and I quite don't manage to do so.
    I have compiled my own static version of Qt5.11.1 with the following flags:

    ./configure -prefix $PWD/qtbase -release -static -accessibility -qt-zlib -qt-libpng -qt-libjpeg -qt-xcb -qt-pcre -qt-freetype -no-glib -no-cups -no-egl -no-xinput2 -no-sm -no-icu -nomake examples -nomake tests -make libs -fontconfig -system-freetype
    

    And I could use it successfully to build other statically linked apps (which weren't using any custom QML Plugin though). When I build this application, the process completes without any error, but when I launch the executable (with QT_DEBUG_PLUGINS=1) I get an empty window and the console reads:

    QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since plugins are disabled in static builds
    loaded library "Xcursor"
    QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5" since plugins are disabled in static builds
    QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1" since plugins are disabled in static builds
    QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1" since plugins are disabled in static builds
    QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QStyleFactoryInterface" since plugins are disabled in static builds
    qrc:/app.qml:3:1: module "RDA3" plugin "rda3plugin" not found
    QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QAccessibleFactoryInterface" since plugins are disabled in static builds
    

    I am not sure what can I do in order to enable plugins in static builds. I have tried to apply these suggestions, but they didn't help (btw I am on Linux, CentOS7).
    As said, the exact same code compiles perfectly as a dynamically linked executable, so I hope it's just matter of enabling plugins, as the error message says.

    Let me know which parts of my code I should share to debug this issue, cause I'm a bit lost...

    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