Skip to content

Fix building of libweaver under MSYS2#18

Open
zulc22 wants to merge 2 commits intoisledecomp:masterfrom
zulc22:master
Open

Fix building of libweaver under MSYS2#18
zulc22 wants to merge 2 commits intoisledecomp:masterfrom
zulc22:master

Conversation

@zulc22
Copy link

@zulc22 zulc22 commented Oct 30, 2024

NOMINMAX is actually defined in MSYS2's headers, so I added #IFNDEF to guard defining NOMINMAX if it was already defined.

@zulc22
Copy link
Author

zulc22 commented Oct 30, 2024

i found another issue with MSYS2. si::File doesn't properly get a handle for a binary file on MSYS2 (using UCRT64 GCC). it does a line-ending conversion. for some reason, SIEdit compiled via MSYS2 is able to extract files perfectly fine despite this. does SIEdit never use *Object->ExtractToFile()?

…-error that CMake won't let me ignore when I embed the library
@madebr
Copy link
Contributor

madebr commented Oct 24, 2025

In #38 I addressed NOMINMAX from cmake.


DWORD m;
switch (s) {
default:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed. All cases are handled.

SIEdit/lib/file.h

Lines 44 to 49 in 6da93b2

enum SeekMode
{
SeekStart,
SeekCurrent,
SeekEnd
};

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been a long time-- it shouldn't but I remember GCC under MSYS2 complaining that it wasn't handled anyway.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants