Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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: https://doc.qt.io/qt-6/windows-building.html

    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)'
    D:\Qt6\Static\6.0.1\plugins\qmltooling\libqmldbg_debugger.a(qqmlenginedebugservice.cpp.obj):qqmlenginedebugservice.cpp
    

    Here is the kit definition:

    f86b177f-695c-4664-93da-c1ce60aaa1d9-image.png

    I'm not sure if this is helpful, but this is the contents of my static build's plugin/qmltooling directory:
    07d84e52-72b8-44f8-ab90-ea3472cc86d4-image.png



  • 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