Skip to content

Windows build incorrectly specifies (requires?) /Zp1 #238

Description

@vvuk

The makefiles for the Windows build specify /Zp1, to request 1-byte packing (basically no alignment). This is not compatible with any Windows SDKs, as the headers there require default packing rules. xsPlatform.h includes winsock2.h, which requires the Windows SDK headers.

This error looks like this from the build:

C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\winnt.h(2487): error C2118: negative subscript

because it's a C assert macro in winnt.h which fails in that way (the actual error is shown in the header in a comment).

I'm not sure whether 1-byte packing is required to build the tools, but I don't see the equivalent gcc option in the linux makefile rules (pack-struct), or even any packed attributes. Removing /Zp1 from all makefiles makes the build succeed, not sure yet if it works.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions