Squirrel / Squirrel.Windows

An installation and update framework for Windows desktop apps
MIT License
7.23k stars 1.02k forks source link

[MSVC][std:c++latest][permissive-] Squirrel.Windows failed to build on MSVC #1792

Closed QuellaZhang closed 2 years ago

QuellaZhang commented 2 years ago

Hi All,

The MSVC team recently added Squirrel as part of RWC testing. And we found some errors when building Squirrel with '/permissive-' or '/std:c++latest'. Could you please help look at this issue or provide some workarounds? Thanks in advance.

Repro steps:

  1. Open VS2022 x64 Tools command
  2. git clone --recursive https://github.com/Squirrel/Squirrel.Windows F:\gitP\Squirrel\Squirrel.Windows
  3. set CL=/permissive- or set CL=/std:c++latest
  4. cd F:\gitP\Squirrel\Squirrel.Windows
  5. ..NuGet\NuGet.exe restore -ConfigFile F:\tools\Nuget_Config\nuget.config Squirrel.sln
  6. msbuild /m /p:Platform="Any CPU" /p:Configuration=Release Squirrel.sln /t:Rebuild

Build log: /permissive-: build (1).log /std:c++latest: build (2).log

Error info: F:\gitP\Squirrel\Squirrel.Windows\src\Setup\wtl90\atlapp.h(1773,7): error C2694: 'LONG WTL::CServerAppModule::Unlock(void)': overriding virtual function has less restrictive exception specification than base class virtual member function 'LONG ATL::CAtlModule::Unlock(void) noexcept' [F:\gitP\Squirrel\Squirrel.Windows\src\Setup\Setup.vcxproj] F:\gitP\Squirrel\Squirrel.Windows\src\Setup\wtl90\atlgdi.h(1762,16): error C2760: syntax error: ')' was unexpected here; expected 'expression' [F:\gitP\Squirrel\Squirrel.Windows\src\Setup\Setup.vcxproj] F:\gitP\Squirrel\Squirrel.Windows\src\Setup\wtl90\atlgdi.h(1762,16): error C2760: syntax error: ')' was unexpected here; expected ';' [F:\gitP\Squirrel\Squirrel.Windows\src\Setup\Setup.vcxproj] F:\gitP\Squirrel\Squirrel.Windows\src\Setup\wtl90\atlgdi.h(1762,16): error C3878: syntax error: unexpected token ')' following 'expression_statement' [F:\gitP\Squirrel\Squirrel.Windows\src\Setup\Setup.vcxproj] F:\gitP\Squirrel\Squirrel.Windows\src\Setup\wtl90\atlgdi.h(1762,16): error C3878: syntax error: unexpected token ')' following 'statement' [F:\gitP\Squirrel\Squirrel.Windows\src\Setup\Setup.vcxproj] F:\gitP\Squirrel\Squirrel.Windows\src\Setup\wtl90\atlgdi.h(1762,16): error C3878: syntax error: unexpected token ')' following 'statement_seq' [F:\gitP\Squirrel\Squirrel.Windows\src\Setup\Setup.vcxproj] F:\gitP\Squirrel\Squirrel.Windows\src\Setup\wtl90\atlgdi.h(1762,16): error C2760: syntax error: ')' was unexpected here; expected '}' [F:\gitP\Squirrel\Squirrel.Windows\src\Setup\Setup.vcxproj] F:\gitP\Squirrel\Squirrel.Windows\src\Setup\wtl90\atlgdi.h(1762,16): error C3878: syntax error: unexpected token ')' following 'compound_statement' [F:\gitP\Squirrel\Squirrel.Windows\src\Setup\Setup.vcxproj] F:\gitP\Squirrel\Squirrel.Windows\src\Setup\wtl90\atlgdi.h(1762,16): error C3878: syntax error: unexpected token ')' following 'selection_statement' [F:\gitP\Squirrel\Squirrel.Windows\src\Setup\Setup.vcxproj]

anaisbetts commented 2 years ago

Nobody outside of MS knows what any of this means