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

Build fails for two subprojects with qtquickcompiler enabled

    XMLWordPrintable

Details

    • Windows

    Description

      If there are two or more subprojects and qtquickcompiler is enabled, the project can't be built.
      Error:

      qmlcache_loader.obj:-1: error: LNK2001: unresolved external symbol "unsigned char const * const QmlCacheGeneratedCode::_0x5f__two_qml::qmlData" (?qmlData@_0x5f__two_qml@QmlCacheGeneratedCode@@3QBEB)
      qmlcache_loader.obj:-1: error: LNK2001: unresolved external symbol "struct QQmlPrivate::AOTCompiledFunction const * const QmlCacheGeneratedCode::_0x5f__two_qml::aotBuiltFunctions" (?aotBuiltFunctions@_0x5f__two_qml@QmlCacheGeneratedCode@@3QBUAOTCompiledFunction@QQmlPrivate@@B)
      qmlcache_loader.obj:-1: error: LNK2019: unresolved external symbol "int __cdecl qInitResources_two_qmlcache(void)" (?qInitResources_two_qmlcache@@YAHXZ) referenced in function "void __cdecl `anonymous namespace'::`dynamic initializer for 'qInitResources_two_ctor_instance_''(void)" (??__EqInitResources_two_ctor_instance_@?A0x4b225b11@@YAXXZ)
      qmlcache_loader.obj:-1: error: LNK2019: unresolved external symbol "int __cdecl qCleanupResources_two_qmlcache(void)" (?qCleanupResources_two_qmlcache@@YAHXZ) referenced in function "int __cdecl qCleanupResources_two(void)" (?qCleanupResources_two@@YAHXZ)
      release\hellotr_one.exe:-1: error: LNK1120: 4 unresolved externals
      

      To reproduce build the attached project.
      Similar ticket but the subprojects are built to separate directories and the errors are different:
      https://bugreports.qt.io/browse/QTBUG-105077

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              alexey89 alexey89
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes