Skip to content

Mingw compilation and bugfixes#262

Merged
spe-ciellt merged 9 commits intodevelopfrom
mingw-compilation-and-bugfixes
Dec 6, 2025
Merged

Mingw compilation and bugfixes#262
spe-ciellt merged 9 commits intodevelopfrom
mingw-compilation-and-bugfixes

Conversation

@spe-ciellt
Copy link
Copy Markdown
Contributor

Update CMake with cross compilation target to Windows using Mingw64.

Current status is it compiles.

Also a bunch of bug fixes and adaptions when different platforms and compiler versions come into play.

It fails on MinGW which needs more thorough examination on why and how.
Happy for the time being, since it compiles
Double backslash escape in config.h.in to get one single backslash escape
config.h. That will then be unescaped backslash in the code hopefully.
…in Windows builds.

The issue was the conflict between DATADIR macro and the Windows SDK's DATADIR
enum type defined in objidl.h.

By prefixing all the macros with GERBV_, we've avoided the namespace collision with
the Windows headers while maintaining all the functionality.
Using %ld for printing out ssize_t is not platform independent and
it became obvious when cross compiling using mingw.
Using unsigned int for number of lines should be enough and thus
using %u is platform independent.
@spe-ciellt spe-ciellt self-assigned this Dec 6, 2025
@spe-ciellt spe-ciellt merged commit a2fe562 into develop Dec 6, 2025
@spe-ciellt spe-ciellt deleted the mingw-compilation-and-bugfixes branch December 6, 2025 15:18
@spe-ciellt spe-ciellt added bug Something isn't working enhancement New feature or request fix Solution for a potential problem or omission. labels Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request fix Solution for a potential problem or omission.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant