Skip to content

Remove "-mwindows" flag from MinGW/Cygwin link options #12949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aidenfoxx
Copy link

@aidenfoxx aidenfoxx commented May 4, 2025

Description

This PR removes the "-mwindows" link option from the MinGW/Cygwin PkgConfig. This flag is problematic as it redirects stdout and stderr to NULL.

This behavior is unintuitive, as one would not expect adding a new library to break console output. It should be up to the consumer to decide if they want to use the flag, rather than the library making assumptions about the project.

This has been previously discussed (and fixed) in this thread: #5948.

EDIT:

It's also good to note that the documentation already covers adding the "WIN32" parameter in CMake, which will pass "-mwindows" by default: https://github.com/libsdl-org/SDL/blob/main/docs/INTRO-cmake.md https://github.com/libsdl-org/SDL/blob/main/docs/README-windows.md

@slouken slouken added this to the 3.x milestone May 4, 2025
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