Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-88080

qtdeclarative linker errors in static Qt builds in windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 6.0.0 Beta2
    • Build System

    Description

      Trying to prepare vcpkg for qt6. (https://github.com/microsoft/vcpkg/pull/14333)

      In the triplet x64-windows-static I get linker errors like:

      qrc_openglblacklists.cpp.obj : error LNK2005: "int __cdecl qInitResources_openglblacklists(void)" (?qInitResources_openglblacklists@@YAHXZ) already defined in qrc_openglblacklists.cpp.obj
      qrc_openglblacklists.cpp.obj : error LNK2005: "int __cdecl qCleanupResources_openglblacklists(void)" (?qCleanupResources_openglblacklists@@YAHXZ) already defined in qrc_openglblacklists.cpp.obj
      qrc_cursors.cpp.obj : error LNK2005: "int __cdecl qInitResources_cursors(void)" (?qInitResources_cursors@@YAHXZ) already defined in qrc_cursors.cpp.obj
      qrc_cursors.cpp.obj : error LNK2005: "int __cdecl qCleanupResources_cursors(void)" (?qCleanupResources_cursors@@YAHXZ) already defined in qrc_cursors.cpp.obj
      qdirect2dd.lib(mocs_compilation.cpp.obj) : error LNK2005: "public: static struct QMetaObject const QWindowsUiaBaseProvider::staticMetaObject" (?staticMetaObject@QWindowsUiaBaseProvider@@2UQMetaObject@@B) already defined in qwindowsd.lib(mocs_compilation.cpp.obj)
      qdirect2dd.lib(mocs_compilation.cpp.obj) : error LNK2005: "private: static void __cdecl QWindowsUiaBaseProvider::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@QWindowsUiaBaseProvider@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z) already defined in qwindowsd.lib(mocs_compilation.cpp.obj)
      

      I have attached the qtbase config log as well as the install/build and config log of qtdeclarative. The errors are in the qtdeclarative-install log

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtbuildsystem Qt Build System Team
            neumann-a Alexander Neumann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes