Important: Please read the Qt Code of Conduct -

Building project with 6.0.1 static build error

  • On Windows 10, I have successfully built static Qt 6.0.1 using the instructions here:

    These are the commands I used when I created the Static 6.0.1 build. All three commands ran without any errors:

    configure.bat -static -release -no-pch -platform win32-g++ -prefix %QtDir% -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests
    cmake --build . --parallel
    cmake --install .

    However, in Qt Creator, my Static 6.0.1 kit is failing to build my project, which successfully builds with the dynamic 6.0.1 kit. I'm getting the following error during compile (it goes on for a lot further than what I've posted, but it all seems to be related to the same thing):

    D:\Qt6\Static\6.0.1\plugins\qmltooling\libqmldbg_debugger.a(qqmlenginedebugservice.cpp.obj):qqmlenginedebugservice.cpp:(.text$_ZN26QQmlEngineDebugServiceImpl14processMessageERK10QByteArray+0x3e): undefined reference to `QPacket::QPacket(int, QByteArray const&)'
    D:\Qt6\Static\6.0.1\plugins\qmltooling\libqmldbg_debugger.a(qqmlenginedebugservice.cpp.obj):qqmlenginedebugservice.cpp:(.text$_ZN26QQmlEngineDebugServiceImpl14processMessageERK10QByteArray+0x87): undefined reference to `QPacket::QPacket(int)'
    D:\Qt6\Static\6.0.1\plugins\qmltooling\libqmldbg_debugger.a(qqmlenginedebugservice.cpp.obj):qqmlenginedebugservice.cpp:(.text$_ZN26QQmlEngineDebugServiceImpl14processMessageERK10QByteArray+0x303): undefined reference to `QPacket::data() const'
    D:\Qt6\Static\6.0.1\plugins\qmltooling\libqmldbg_debugger.a(qqmlenginedebugservice.cpp.obj):qqmlenginedebugservice.cpp:(.text$_ZN26QQmlEngineDebugServiceImpl15propertyChangedEiiRK13QMetaPropertyRK8QVariant+0x35): undefined reference to `QPacket::QPacket(int)'

    Here is the kit definition:


    I'm not sure if this is helpful, but this is the contents of my static build's plugin/qmltooling directory:

  • This issue resolved itself. I think there was some build caching going on behind the scenes. I created a test project using the same static Kit, and that succeeded in building and running. When I switched back to my main project, it succeeded.

Log in to reply