Qt World Summit: Submit your Presentation

bug for static compile

  • 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,

    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
        if (qt_debug_component()) {
            qDebug() << "QFactoryLoader::QFactoryLoader() ignoring" << d->iid
                     << "since plugins are disabled in static builds";

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

Log in to reply