Skip to content

Fix Windows.h min/max build issue#293

Open
Deji69 wants to merge 1 commit into
OrfeasZ:masterfrom
Deji69:master
Open

Fix Windows.h min/max build issue#293
Deji69 wants to merge 1 commit into
OrfeasZ:masterfrom
Deji69:master

Conversation

@Deji69

@Deji69 Deji69 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Adds a min/max fix to prevent build issues occurring in ZString.h due to usage of std::min after Windows.h has been included.

@astra1dev

Copy link
Copy Markdown

Wow I just discovered this has been an issue with Windows.h (specifically WinDef.h) for a very long time... https://www.suodenjoki.dk/us/archive/2010/min-max.htm
Thanks Microsoft!

@Deji69

Deji69 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Using NOMINMAX also tends to often not be sufficient for some reason (maybe something to do with the complexities of the build system - might be more effective if defined in CMake), so I usually have to add an include to every project with these same #undef directives.

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