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

bug for static compile

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 352 Views
  • 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.
  • L Offline
    L Offline
    Leex2000
    wrote on last edited by VRonin
    #1

    I use vs2017 in my work under Windows,I need /Mt to compile my project, but QT default compile is /Md.
    I have to recompile QT with static mode,I config it such as:
    configure -confirm-license -opensource -debug-and-release -static -static-runtime -force-debug-info -nomake examples -nomake tests -prefix D:/qt/Qt5.10.1_static
    After a long compile time,I got static version QT.
    I make a empty project,compile and run,i got a fatal!
    I try to debug it,

    qguiapplication:
    static void init_platform(const QString &pluginArgument, const QString &platformPluginPath, const QString &platformThemeName, int &argc, char **argv)
    {
    ...
        QGuiApplicationPrivate::platform_integration = QPlatformIntegrationFactory::create(name, arguments, argc, argv, platformPluginPath);
        if (Q_UNLIKELY(!QGuiApplicationPrivate::platform_integration)) {
    ...
    }
    the platform_integration is null, then fatal!
    but in qfactoryloader.cpp:
    void QFactoryLoader::update()
    {
    #ifdef QT_SHARED
    ...
    #else
        Q_D(QFactoryLoader);
        if (qt_debug_component()) {
            qDebug() << "QFactoryLoader::QFactoryLoader() ignoring" << d->iid
                     << "since plugins are disabled in static builds";
        }
    #endif
    

    the QFactoryLoader think "plugins are disabled in static builds",but init_platform doesn't think so.
    I don't known how to fix it.

    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