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

Fail to build on Windows (mocs_compilation linker error)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 6.3.2
    • Build tools: moc
    • None
    • Windows 10 Home 22H2 (19045.2251), 64 bit, Qt Creator 8.0.2, Qt 6.3.2, MSVC19 compiler
    • Windows

    Description

      Code that builds fine on macOS is failing on Windows with the following:

      LINK Pass 1: command "C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1430~1.307\bin\Hostx64\x64\link.exe /nologo app\CMakeFiles\SynthAudioIO.dir\SynthAudioIO_autogen\mocs_compilation.cpp.obj app\CMakeFiles\SynthAudioIO.dir\synthaudioio_qmltyperegistrations.cpp.obj app\CMakeFiles\SynthAudioIO.dir\.rcc\qrc_qmake_SynthAudioIO.cpp.obj app\CMakeFiles\SynthAudioIO.dir\AudioSinkContainer.cpp.obj app\CMakeFiles\SynthAudioIO.dir\SynthDevice.cpp.obj app\CMakeFiles\SynthAudioIO.dir\SynthDeviceContainer.cpp.obj /out:app\SynthAudioIO.dll /implib:app\SynthAudioIO.lib /pdb:app\SynthAudioIO.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL app\Synths.lib C:\Qt\6.3.2\msvc2019_64\lib\Qt6Qmld.lib shell32.lib C:\Qt\6.3.2\msvc2019_64\lib\Qt6Multimediad.lib C:\Qt\6.3.2\msvc2019_64\lib\Qt6Networkd.lib ws2_32.lib C:\Qt\6.3.2\msvc2019_64\lib\Qt6Guid.lib C:\Qt\6.3.2\msvc2019_64\lib\Qt6Cored.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:app\CMakeFiles\SynthAudioIO.dir/intermediate.manifest app\CMakeFiles\SynthAudioIO.dir/manifest.res" failed (exit code 1120) with the following output:
         Creating library app\SynthAudioIO.lib and object app\SynthAudioIO.exp
      mocs_compilation.cpp.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const Synth::staticMetaObject" (?staticMetaObject@Synth@@2UQMetaObject@@B)
      SynthDevice.cpp.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const Synth::staticMetaObject" (?staticMetaObject@Synth@@2UQMetaObject@@B)
      SynthDeviceContainer.cpp.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const Synth::staticMetaObject" (?staticMetaObject@Synth@@2UQMetaObject@@B)
      SynthDevice.cpp.obj : error LNK2019: unresolved external symbol "public: static float __cdecl oum_synth::SynthCompressor::compress(float)" (?compress@SynthCompressor@oum_synth@@SAMM@Z) referenced in function "public: virtual __int64 __cdecl SynthDevice::readData(char *,__int64)" (?readData@SynthDevice@@UEAA_JPEAD_J@Z)
      SynthDevice.cpp.obj : error LNK2019: unresolved external symbol "public: __cdecl Synth::Synth(class QAudioFormat const &,class QObject *)" (??0Synth@@QEAA@AEBVQAudioFormat@@PEAVQObject@@@Z) referenced in function "public: __cdecl SynthDevice::SynthDevice(class QAudioFormat const &,class QObject *)" (??0SynthDevice@@QEAA@AEBVQAudioFormat@@PEAVQObject@@@Z)
      SynthDevice.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl Synth::minVolumeChanged(float)" (?minVolumeChanged@Synth@@QEAAXM@Z) referenced in function "public: void __cdecl Synth::setMinVolume(float)" (?setMinVolume@Synth@@QEAAXM@Z)
      SynthDevice.cpp.obj : error LNK2019: unresolved external symbol "public: void __cdecl Synth::maxVolumeChanged(float)" (?maxVolumeChanged@Synth@@QEAAXM@Z) referenced in function "public: void __cdecl Synth::setMaxVolume(float)" (?setMaxVolume@Synth@@QEAAXM@Z)
      SynthDevice.cpp.obj : error LNK2019: unresolved external symbol "protected: void __cdecl Synth::setter(float &,void (__cdecl Synth::*)(float),float const &)" (?setter@Synth@@IEAAXAEAMP81@EAAXM@ZAEBM@Z) referenced in function "public: void __cdecl Synth::setMaxVolume(float)" (?setMaxVolume@Synth@@QEAAXM@Z)
      app\SynthAudioIO.dll : fatal error LNK1120: 6 unresolved externals
      
      

      Attachments

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

        Activity

          People

            fabiankosmale Fabian Kosmale
            paulmasri Paul
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes