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

Windows: Linking with MSVC debug build is failing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 6.2.2
    • Conan
    • None
    • Windows

    Description

      Building e.g. qtbase\examples\qtconcurrent\wordcount with a Debug build against qtbase/6.2.2@qt/everywhere with MSVC fails:

      mkdir qtbase\examples\qtconcurrent\wordcount\build
      cd qtbase\examples\qtconcurrent\wordcount\build
      conan install -g virtualenv qtbase/6.2.2@qt/everywhere --profile C:\dev\conan-profiles\windows-x86_64-msvc2019_64
      activate
      cmake -G Ninja -D CMAKE_BUILD_TYPE=Debug ..
      ninja
      

      results in

      LINK Pass 1: command "C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1430~1.307\bin\Hostx64\x64\link.exe /nologo CMakeFiles\wordcount.dir\wordcount_autogen\mocs_compilation.cpp.obj CMakeFiles\wordcount.dir\main.cpp.obj /out:wordcount.exe /implib:wordcount.lib /pdb:wordcount.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console C:\.conan\8de675\1\lib\Qt6Concurrent.lib C:\.conan\8de675\1\lib\Qt6Widgets.lib C:\.conan\8de675\1\lib\Qt6Gui.lib C:\.conan\8de675\1\lib\Qt6Core.lib mpr.lib userenv.lib d3d11.lib dxgi.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\wordcount.dir/intermediate.manifest CMakeFiles\wordcount.dir/manifest.res" failed (exit code 1120) with the following output:
      main.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QtPrivate::ResultIteratorBase::~ResultIteratorBase(void)" (__imp_??1ResultIteratorBase@QtPrivate@@QEAA@XZ) referenced in function "public: class QMap<class QString,int> const & __cdecl QFutureInterface<class QMap<class QString,int> >::resultReference(int)const " (?resultReference@?$QFutureInterface@V?$QMap@VQString@@H@@@@QEBAAEBV?$QMap@VQString@@H@@H@Z)
      wordcount.exe : fatal error LNK1120: 1 unresolved externals
      

      Attachments

        For Gerrit Dashboard: QTBUG-99213
        # Subject Branch Project Status CR V

        Activity

          People

            iknd Iikka Eklund
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes