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

Adding *.js to resources of project without QML leads to linker error

XMLWordPrintable

    • Windows
    • c5578b16d6454e708c8ce12661a85d41eeaaa758 (qt/qtdeclarative/5.12) 227be82e4cf4b0fc58d4d50154cee7c45eb03777 (qt/qtdeclarative/wip/cmake)

      MSVC 2017

      qmlcache_loader.obj:-1: error: LNK2019: unresolved external symbol "_declspec(dllimport) int __cdecl QQmlPrivate::qmlregister(enum QQmlPrivate::RegistrationType,void *)" (imp?qmlregister@QQmlPrivate@@YAHW4RegistrationType@1@PAX@Z) in a function "public: __thiscall `anonymous namespace'::Registry::Registry(void)" (??0Registry@?A0x7ba8ed9e@@QAE@XZ)

      MinGW 

      qmlcache_loader.cpp:-1: error: undefined reference to `_imp_ZN11QQmlPrivate11qmlregisterENS_16RegistrationTypeEPv'

       

      The problem can be bypassed by changing resolution of original file type (".js" -> ".jss") and adding alias name to it. Yet this is lame.

      ALSO: QTBUG-73670

       

        1. RcJsTest.rar
          9 kB
          Alex Frost
        For Gerrit Dashboard: QTBUG-73669
        # Subject Branch Project Status CR V

            shausman Simon Hausmann
            icpu Alex Frost
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: