[Scummvm-tracker] [ScummVM :: Bugs] #11380: WIN32: Error when building with MSVC 2019
ScummVM :: Bugs
trac at scummvm.org
Sun Mar 8 12:30:09 UTC 2020
#11380: WIN32: Error when building with MSVC 2019
----------------------------+-------------------------
Reporter: carlo-bramini | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Port: Win32
Resolution: | Keywords:
Game: |
----------------------------+-------------------------
Description changed by carlo-bramini:
Old description:
> 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.
New description:
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.
EDIT: the error happens in these files:
backends\graphics\opengl\pipelines\pipeline.cpp
backends\graphics\opengl\pipelines\clut8.cpp
backends\events\sdl\sdl-events.cpp
backends\graphics\opengl\pipelines\fixed.cpp
backends\graphics\opengl\opengl-graphics.cpp
backends\graphics\opengl\framebuffer.cpp
backends\graphics\opengl\texture.cpp
backends\graphics\opengl\context.cpp
backends\graphics\openglsdl\openglsdl-graphics.cpp
backends\mixer\sdl\sdl-mixer.cpp
backends\graphics\sdl\sdl-graphics.cpp
backends\graphics\surfacesdl\surfacesdl-graphics.cpp
backends\platform\sdl\win32\win32-window.cpp
backends\mutex\sdl\sdl-mutex.cpp
backends\platform\sdl\sdl-window.cpp
backends\platform\sdl\sdl.cpp
backends\timer\sdl\sdl-timer.cpp
--
--
Ticket URL: <https://bugs.scummvm.org/ticket/11380#comment:1>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list