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

incompatible exported QQmlJS::Dom symbols between MSVC 2019 and 2022

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.7.3, 6.8
    • 6.7.2
    • QML: Tooling
    • None
    • bc14c6d7a (6.7)

    Description

      When using the MSVC 2022 compiler/linker but a Qt build from MSVC 2019 (all our Qt versions less than 6.8 from the installer), we can not link to static QmlDom library.

      The simple main.cpp:

      #include <QCoreApplication>
      #include <private/qqmldomtop_p.h>
      
      int main(int argc, char *argv[])
      {
          QCoreApplication app(argc, argv);
          QQmlJS::Dom::DomItem items;
      
          return app.exec();
      }
      

      gives you:

      main.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl QQmlJS::Dom::DomBase::dump(class QQmlJS::Dom::DomItem const &,class qxp::function_ref<void __cdecl(class QStringView)>,int,class qxp::function_ref<bool __cdecl(class QQmlJS::Dom::DomItem const &,class QQmlJS::Dom::PathEls::PathComponent const &,class QQmlJS::Dom::DomItem const &)>)const " (?dump@DomBase@Dom@QQmlJS@@UEBAXAEBVDomItem@23@V?$function_ref@$$A6AXVQStringView@@@Z@qxp@@HV?$function_ref@$$A6A_NAEBVDomItem@Dom@QQmlJS@@AEBVPathComponent@PathEls@23@0@Z@6@@Z)
      main.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl QQmlJS::Dom::Empty::iterateDirectSubpaths(class QQmlJS::Dom::DomItem const &,class qxp::function_ref<bool __cdecl(class QQmlJS::Dom::PathEls::PathComponent const &,class qxp::function_ref<class QQmlJS::Dom::DomItem __cdecl(void)>)>)const " (?iterateDirectSubpaths@Empty@Dom@QQmlJS@@UEBA_NAEBVDomItem@23@V?$function_ref@$$A6A_NAEBVPathComponent@PathEls@Dom@QQmlJS@@V?$function_ref@$$A6A?AVDomItem@Dom@QQmlJS@@XZ@qxp@@@Z@qxp@@@Z)
      main.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl QQmlJS::Dom::Empty::dump(class QQmlJS::Dom::DomItem const &,class qxp::function_ref<void __cdecl(class QStringView)>,int,class qxp::function_ref<bool __cdecl(class QQmlJS::Dom::DomItem const &,class QQmlJS::Dom::PathEls::PathComponent const &,class QQmlJS::Dom::DomItem const &)>)const " (?dump@Empty@Dom@QQmlJS@@UEBAXAEBVDomItem@23@V?$function_ref@$$A6AXVQStringView@@@Z@qxp@@HV?$function_ref@$$A6A_NAEBVDomItem@Dom@QQmlJS@@AEBVPathComponent@PathEls@23@0@Z@6@@Z)
      main.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl QQmlJS::Dom::Map::iterateDirectSubpaths(class QQmlJS::Dom::DomItem const &,class qxp::function_ref<bool __cdecl(class QQmlJS::Dom::PathEls::PathComponent const &,class qxp::function_ref<class QQmlJS::Dom::DomItem __cdecl(void)>)>)const " (?iterateDirectSubpaths@Map@Dom@QQmlJS@@UEBA_NAEBVDomItem@23@V?$function_ref@$$A6A_NAEBVPathComponent@PathEls@Dom@QQmlJS@@V?$function_ref@$$A6A?AVDomItem@Dom@QQmlJS@@XZ@qxp@@@Z@qxp@@@Z)
      main.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl QQmlJS::Dom::List::iterateDirectSubpaths(class QQmlJS::Dom::DomItem const &,class qxp::function_ref<bool __cdecl(class QQmlJS::Dom::PathEls::PathComponent const &,class qxp::function_ref<class QQmlJS::Dom::DomItem __cdecl(void)>)>)const " (?iterateDirectSubpaths@List@Dom@QQmlJS@@UEBA_NAEBVDomItem@23@V?$function_ref@$$A6A_NAEBVPathComponent@PathEls@Dom@QQmlJS@@V?$function_ref@$$A6A?AVDomItem@Dom@QQmlJS@@XZ@qxp@@@Z@qxp@@@Z)
      main.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl QQmlJS::Dom::List::dump(class QQmlJS::Dom::DomItem const &,class qxp::function_ref<void __cdecl(class QStringView)>,int,class qxp::function_ref<bool __cdecl(class QQmlJS::Dom::DomItem const &,class QQmlJS::Dom::PathEls::PathComponent const &,class QQmlJS::Dom::DomItem const &)>)const " (?dump@List@Dom@QQmlJS@@UEBAXAEBVDomItem@23@V?$function_ref@$$A6AXVQStringView@@@Z@qxp@@HV?$function_ref@$$A6A_NAEBVDomItem@Dom@QQmlJS@@AEBVPathComponent@PathEls@23@0@Z@6@@Z)
      main.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl QQmlJS::Dom::ConstantData::iterateDirectSubpaths(class QQmlJS::Dom::DomItem const &,class qxp::function_ref<bool __cdecl(class QQmlJS::Dom::PathEls::PathComponent const &,class qxp::function_ref<class QQmlJS::Dom::DomItem __cdecl(void)>)>)const " (?iterateDirectSubpaths@ConstantData@Dom@QQmlJS@@UEBA_NAEBVDomItem@23@V?$function_ref@$$A6A_NAEBVPathComponent@PathEls@Dom@QQmlJS@@V?$function_ref@$$A6A?AVDomItem@Dom@QQmlJS@@XZ@qxp@@@Z@qxp@@@Z)
      main.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl QQmlJS::Dom::Reference::iterateDirectSubpaths(class QQmlJS::Dom::DomItem const &,class qxp::function_ref<bool __cdecl(class QQmlJS::Dom::PathEls::PathComponent const &,class qxp::function_ref<class QQmlJS::Dom::DomItem __cdecl(void)>)>)const " (?iterateDirectSubpaths@Reference@Dom@QQmlJS@@UEBA_NAEBVDomItem@23@V?$function_ref@$$A6A_NAEBVPathComponent@PathEls@Dom@QQmlJS@@V?$function_ref@$$A6A?AVDomItem@Dom@QQmlJS@@XZ@qxp@@@Z@qxp@@@Z)
      main.cpp.obj : error LNK2019: unresolved external symbol "public: bool __cdecl QQmlJS::Dom::DomItem::iterateDirectSubpaths(class qxp::function_ref<bool __cdecl(class QQmlJS::Dom::PathEls::PathComponent const &,class qxp::function_ref<class QQmlJS::Dom::DomItem __cdecl(void)>)>)const " (?iterateDirectSubpaths@DomItem@Dom@QQmlJS@@QEBA_NV?$function_ref@$$A6A_NAEBVPathComponent@PathEls@Dom@QQmlJS@@V?$function_ref@$$A6A?AVDomItem@Dom@QQmlJS@@XZ@qxp@@@Z@qxp@@@Z) referenced in function "public: virtual class QQmlJS::Dom::DomItem __cdecl QQmlJS::Dom::DomBase::field(class QQmlJS::Dom::DomItem const &,class QStringView)const " (?field@DomBase@Dom@QQmlJS@@UEBA?AVDomItem@23@AEBV423@VQStringView@@@Z)
      

      Attachments

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

        Activity

          People

            fabiankosmale Fabian Kosmale
            tjenssen Tim Jenssen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes