Opened 4 years ago

Last modified 4 years ago

#11380 closed defect

WIN32: Error when building with MSVC 2019 — at Initial Version

Reported by: carlo-bramini Owned by:
Priority: normal Component: Port: Win32
Version: Keywords:
Cc: Game:

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.

Change History (0)

Note: See TracTickets for help on using tickets.