-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix compilation with MinGW on Windows #7744
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Does it also solve the warning?
Edit: no it does not. Not the scope of this PR I guess. |
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 18, 2021
See discussion in musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 18, 2021
Partial backport of musescore#7744
shoogle
commented
Mar 18, 2021
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 19, 2021
Partial backport of musescore#7744
shoogle
force-pushed
the
compile-mingw
branch
2 times, most recently
from
March 19, 2021 14:05
8743edd
to
6cf6125
Compare
Use the explicit 'W' (wide) symbols from the Windows API to provide Unicode support regardless of whether UNICODE is defined: - SetFileAttributesW - LPCWSTR Define UNICODE anyway for the sake of thirdparty code that uses the aliases, which only work properly when UNICODE is defined: - SetFileAttributes - LPCTSTR If UNICODE is not defined then the aliases refer to the narrow symbols: - SetFileAttributesA - LPCSTR But the explict 'W' symbols are still available. The aliases are only needed for compatibility with code written prior to Windows NT.
igorkorsukov
approved these changes
Mar 19, 2021
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 20, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 24, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 24, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Apr 10, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Apr 26, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Apr 26, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
May 11, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Jun 28, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Jul 1, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Jul 27, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Jul 27, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Jul 27, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Jul 28, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Jul 28, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Aug 13, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Aug 13, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Aug 19, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Aug 19, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 2, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 10, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Sep 23, 2021
Partial backport of musescore#7744
Jojo-Schmitz
pushed a commit
to Jojo-Schmitz/MuseScore
that referenced
this pull request
Mar 5, 2023
Partial backport of musescore#7744
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Errors fixed:
Edit: The errors arose because we were using these aliases from the Windows API:
SetFileAttributes
LPCTSTR
When
UNICODE
is defined these aliases point to 'W' (wide) symbols that provide Unicode support (UTF-16):SetFileAttributesW
LPCWSTR
However, if
UNICODE
is not defined then the aliases point to the narrow ANSI (8-bit) symbols:SetFileAttributesA
LPCSTR
The fix is to explicitly use the wide symbols (i.e. don't use the aliases). The wide symbols are available on Windows even when
UNICODE
is undefined; it's just the aliases that are different. The aliases are only needed for compatibility with code written prior to Windows NT, so it's probably best to avoid them.