Remove "-mwindows" flag from MinGW/Cygwin link options #12949
+0
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR removes the "-mwindows" link option from the MinGW/Cygwin PkgConfig. This flag is problematic as it redirects
stdout
andstderr
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