[Scummvm-tracker] [ScummVM :: Bugs] #11380: WIN32: Error when building with MSVC 2019

ScummVM :: Bugs trac at scummvm.org
Sun Mar 8 12:15:45 UTC 2020


#11380: WIN32: Error when building with MSVC 2019
--------------------------+-------------------------
Reporter:  carlo-bramini  |      Owner:  (none)
    Type:  defect         |     Status:  new
Priority:  normal         |  Component:  Port: Win32
Keywords:                 |       Game:
--------------------------+-------------------------
 After successfully building SCUMMVM for several platforms, I tried to
 build it also with Visual Studio 2019 community edition.
 I followed the simple instructions described in the wiki and I started to
 build everything easily. Unfortunately, I got the same error in few files.
 For example, this is the error message for 'clut8.cpp':


 {{{
 1>C:\Program Files (x86)\Windows
 Kits\10\Include\10.0.18362.0\um\winnt.h(2482,40): error C2338: Windows
 headers require the default packing option. Changing this can lead to
 memory corruption. This diagnostic can be disabled by building with
 WINDOWS_IGNORE_PACKING_MISMATCH defined. (compilazione del file di origine
 ..\..\backends\graphics\opengl\pipelines\clut8.cpp)

 }}}

 The content of 'winnt.h' in that point is:


 {{{
 // Much of the Windows SDK assumes the default packing of structs.
 #if !defined(WINDOWS_IGNORE_PACKING_MISMATCH) && !defined(__midl) &&
 !defined(MIDL_PASS) && !defined(SORTPP_PASS) && !defined(RC_INVOKED)
 #if defined(__cplusplus) && (_MSC_VER >= 1600)
 static_assert(__alignof(LARGE_INTEGER) == 8, "Windows headers require the
 default packing option. Changing this can lead to memory corruption."
     " This diagnostic can be disabled by building with
 WINDOWS_IGNORE_PACKING_MISMATCH defined.");
 #elif _MSC_VER >= 1300
 #pragma warning(push)
 #pragma warning(disable: 4116)
 C_ASSERT(TYPE_ALIGNMENT(LARGE_INTEGER) == 8);
 #pragma warning(pop)
 #endif
 #endif

 }}}

 I'm using the latest sources from repository at the time of writing and
 Windows SDK is the latest version 10 available.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/11380>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list