Skip to content

Conversation

@WagnerChristoph
Copy link

Fix the problem when building with MSVC due to a macro conflict, arising from including windows.h without a preceding #define NOMINMAX (as it re-defines min/max otherwise).
In this case, picoboot_connection.h included the libusb.h header unguardedly, which in turn includes windows.h. This was previously fixed with #undef min/max, but in main.cpp only after including model.h, where the error occurred.
Also added the guard to portable_endian.h, the other place where windows.h might be included (through winsock2.h), and cleaned up the now obsolete #undefs.

Fixes #288.

@lurch
Copy link
Contributor

lurch commented Jan 30, 2026

@WagnerChristoph Please ignore all the CI build failures - they're our fault, not your fault 😉

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