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

qt 6.3.0 build error: On MSVC you must pass the /permissive- option to the compiler.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.3.0
    • Build System
    • None

    Description

      新建qbs工程,系统自动生成的demo,build的时候报错:

      17:15:58: Running steps for project qtdemo...
      generating ui_mainwindow.h [qtdemo]
      moc mainwindow.h [qtdemo]
      compiling moc_mainwindow.cpp [qtdemo]
      compiling main.cpp [qtdemo]
      compiling mainwindow.cpp [qtdemo]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe /nologo /c /EHsc /O2 /MD /ID:\project\qtdemo\build-qtdemo-Desktop_Qt_6_3_0_MSVC2019_64bit-Release\Release_Desktop_21035b1181c4c700\qtdemo.f85a59e3\qt.headers /experimental:external /external:W0 /external:IC:\Qt\6.3.0\msvc2019_64\include /external:IC:\Qt\6.3.0\msvc2019_64\include\QtWidgets /external:IC:\Qt\6.3.0\msvc2019_64\include\QtGui /external:IC:\Qt\6.3.0\msvc2019_64\include\QtCore /external:IC:\Qt\6.3.0\msvc2019_64\mkspecs\win32-msvc /DNDEBUG /DUNICODE /D_UNICODE /DWIN32 /DQT_WIDGETS_LIB /DQT_GUI_LIB /DQT_CORE_LIB /DQT_NO_DEBUG "/DWINVER=0x0502" "/D_WIN32_WINNT=0x0502" "/D_WIN32_WINDOWS=0x0502" /Zc:cplusplus /FoD:\project\qtdemo\build-qtdemo-Desktop_Qt_6_3_0_MSVC2019_64bit-Release\Release_Desktop21035b1181c4c700\qtdemo.f85a59e3\73489b871e127538\moc_mainwindow.cpp.obj D:\project\qtdemo\build-qtdemo-Desktop_Qt_6_3_0_MSVC2019_64bit-Release\Release_Desktop_21035b1181c4c700\qtdemo.f85a59e3\qt.headers\moc_mainwindow.cpp /TP /std:c++17 /FS
      C:\Qt\6.3.0\msvc2019_64\include\QtCore/qglobal.h(139): error C2338: On MSVC you must pass the /permissive- option to the compiler.
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe /nologo /c /EHsc /O2 /MD /ID:\project\qtdemo\build-qtdemo-Desktop_Qt_6_3_0_MSVC2019_64bit-Release\Release_Desktop_21035b1181c4c700\qtdemo.f85a59e3\qt.headers /experimental:external /external:W0 /external:IC:\Qt\6.3.0\msvc2019_64\include /external:IC:\Qt\6.3.0\msvc2019_64\include\QtWidgets /external:IC:\Qt\6.3.0\msvc2019_64\include\QtGui /external:IC:\Qt\6.3.0\msvc2019_64\include\QtCore /external:IC:\Qt\6.3.0\msvc2019_64\mkspecs\win32-msvc /DNDEBUG /DUNICODE /D_UNICODE /DWIN32 /DQT_WIDGETS_LIB /DQT_GUI_LIB /DQT_CORE_LIB /DQT_NO_DEBUG "/DWINVER=0x0502" "/D_WIN32_WINNT=0x0502" "/D_WIN32_WINDOWS=0x0502" /Zc:cplusplus /FoD:\project\qtdemo\build-qtdemo-Desktop_Qt_6_3_0_MSVC2019_64bit-Release\Release_Desktop_21035b1181c4c700\qtdemo.f85a59e3\3a52ce780950d4d9\mainwindow.cpp.obj D:\project\qtdemo\qtdemo\mainwindow.cpp /TP /std:c++17 /FS
      C:\Qt\6.3.0\msvc2019_64\include\QtCore/qglobal.h(139): error C2338: On MSVC you must pass the /permissive- option to the compiler.
      Process failed with exit code 2.
      The following products could not be built for configuration Release_Desktop__21035b1181c4c700:
      qtdemo
      Error while building/deploying project qtdemo (kit: Desktop Qt 6.3.0 MSVC2019 64bit)
      When executing step "Qbs Build"
      17:15:59: Elapsed time: 00:01.

      Attachments

        Issue Links

          Activity

            People

              qtbuildsystem Qt Build System Team
              dsh du sh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: