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

[MSVC] Qt6 failed to build due to error C2695 on Windows x86 mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.5.1, 6.6.0
    • 6.4.0, 6.5.0
    • Speech
    • None
    • OS: Windows server 2022
      VS: VS2022 17.5.3
    • Windows
    • 96c37ee46 (dev), 4293a203e (6.5)

    Description

      Recently, we update Qt6 to Qt6.4, commit is e83e6f7, and it failed to build on Windows x86 mode due to the below error, could you please take a look? Thanks.

      Rerpr steps:

      1. open VS2022 x86 Native Tools command.
      2. git clone https://github.com/qt/qt5 F:\gitP\qt\qt6
      3. cd F:\gitP\qt\qt6
      4. git checkout 6.4
      5. git -C "F:\gitP\qt\qt6" reset --hard e83e6f7
      6. git -C "F:\gitP\qt\qt6" submodule foreach git reset --hard
      7. git -C "F:\gitP\qt\qt6" submodule foreach git clean -xdf
      8. perl init-repository
      9. mkdir F:\gitP\qt\qt6\build_x86 and cd F:\gitP\qt\qt6\build_x86
      10. ..\configure -developer-build -release -confirm-license -opensource -nomake tests
      11. cmake --build . --parallel --verbose

      Error info:

      F:\gitP\qt\qt6\qtspeech\src\plugins\tts\winrt\qtexttospeech_winrt_audiosource.h(65): error C2695: 'AudioSource::AddRef': overriding virtual function differs from 'IUnknown::AddRef' only by calling convention
      C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\unknwnbase.h(125): note: see declaration of 'IUnknown::AddRef'
      F:\gitP\qt\qt6\qtspeech\src\plugins\tts\winrt\qtexttospeech_winrt_audiosource.h(66): error C2695: 'AudioSource::Release': overriding virtual function differs from 'IUnknown::Release' only by calling convention
      C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\unknwnbase.h(127): note: see declaration of 'IUnknown::Release'
      F:\gitP\qt\qt6\qtspeech\src\plugins\tts\winrt\qtexttospeech_winrt_audiosource.h(73): error C2695: 'AudioSource::QueryInterface': overriding virtual function differs from 'IUnknown::QueryInterface' only by calling convention
      C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um\unknwnbase.h(121): note: see declaration of 'IUnknown::QueryInterface'
      F:\gitP\qt\qt6\qtspeech\src\plugins\tts\winrt\qtexttospeech_winrt_audiosource.h(79): error C2695: 'AudioSource::Invoke': overriding virtual function differs from 'ABI::Windows::Foundation::IAsyncOperationWithProgressCompletedHandler_impl<ABI::Windows::Storage::Streams::IBuffer *,UINT32>::Invoke' only by calling convention
      C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt\windows.foundation.collections.h(873): note: see declaration of 'ABI::Windows::Foundation::IAsyncOperationWithProgressCompletedHandler_impl<ABI::Windows::Storage::Streams::IBuffer *,UINT32>::Invoke'
      F:\gitP\qt\qt6\qtspeech\src\plugins\tts\winrt\qtexttospeech_winrt_audiosource.h(76): error C2695: 'AudioSource::Invoke': overriding virtual function differs from 'ABI::Windows::Foundation::IAsyncOperationCompletedHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Media::SpeechSynthesis::SpeechSynthesisStream *,ABI::Windows::Media::SpeechSynthesis::ISpeechSynthesisStream *>>::Invoke' only by calling convention
      C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt\windows.foundation.collections.h(898): note: see declaration of 'ABI::Windows::Foundation::IAsyncOperationCompletedHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Windows::Media::SpeechSynthesis::SpeechSynthesisStream *,ABI::Windows::Media::SpeechSynthesis::ISpeechSynthesisStream *>>::Invoke'

       

      Expected Result:

      build successfully on windows x86 mode.{}

      Detailed log:build.zip

      Attachments

        Activity

          People

            vhilshei Volker Hilsheimer
            june_liu June Liu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: