https://bugs.winehq.org/show_bug.cgi?id=39904
Bug ID: 39904 Summary: Show "You must use msvcrt when building in Unicode/MBCS mode" error only if !defined(__MSVCRT__) Product: Wine Version: 1.9.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: anthony@anthonyfok.org Distribution: ---
Created attachment 53294 --> https://bugs.winehq.org/attachment.cgi?id=53294 Show "You must use msvcrt when building in Unicode/MBCS mode" error only if !defined(__MSVCRT__)
Whenever -D_UNICODE is used, running winegcc would give the following error:
../wine-source/include/tchar.h:27:2: error: #error You must use msvcrt when building in Unicode/MBCS mode #error You must use msvcrt when building in Unicode/MBCS mode
And as of Wine 1.9.0, adding -mno-cygwin to "use msvcrt" does not make the error go away.
Fortunately, a solution was suggested by Alexandre Julliard in 2004:
"Martin Fuchs" <martin-fuchs at gmx.net> writes:
> Either there should be a overriding "wine/include/msvcrt/tchar.h" > file with different defintions. Or the error message "You must use > msvcrt when building in Unicode/MBCS mode" is simply superfluous.
It's not superfluous, but it probably needs a !defined(__MSVCRT__) in there.
-- Alexandre Julliard julliard at winehq.org
(from https://www.winehq.org/pipermail/wine-devel/2004-October/030349.html)
In 2012, Ilya Konstantinov wrote that he successfully overcome that error by applying Alexandre's change [to tchar.h] locally, see https://www.winehq.org/pipermail/wine-devel/2012-July/096607.html
I ran into the same problem today, and, as a newbie, spent a long time before I figured out the proper fix, i.e., to patch tchar.h and to add the -mno-cygwin flag.
Hence this bug report and the attached patch. Many thanks!
Anthony
https://bugs.winehq.org/show_bug.cgi?id=39904
Anthony Fok anthony@anthonyfok.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |anthony@anthonyfok.org
https://bugs.winehq.org/show_bug.cgi?id=39904
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
--- Comment #1 from Austin English austinenglish@gmail.com --- Please send your patch to wine-patches@winehq.org, they are not picked up from Bugzilla.
Thanks!
https://bugs.winehq.org/show_bug.cgi?id=39904
--- Comment #2 from Anthony Fok foka@debian.org --- (In reply to Austin English from comment #1)
Please send your patch to wine-patches@winehq.org, they are not picked up from Bugzilla.
Thanks!
Thank you very much, Austin!
I have just followed the instruction at http://wiki.winehq.org/SubmittingPatches and submitted my first patch to wine-patches@winehq.org, and it is now in https://source.winehq.org/patches/data/117773.
(Hope I didn't make too many mistakes, hehe.)
Cheers, Anthony
https://bugs.winehq.org/show_bug.cgi?id=39904
--- Comment #3 from Austin English austinenglish@gmail.com --- (In reply to Anthony Fok from comment #2)
(In reply to Austin English from comment #1)
Please send your patch to wine-patches@winehq.org, they are not picked up from Bugzilla.
Thanks!
Thank you very much, Austin!
I have just followed the instruction at http://wiki.winehq.org/SubmittingPatches and submitted my first patch to wine-patches@winehq.org, and it is now in https://source.winehq.org/patches/data/117773.
(Hope I didn't make too many mistakes, hehe.)
Cheers, Anthony
Nope, looks fine to me, thanks for submitting.
https://bugs.winehq.org/show_bug.cgi?id=39904
Anthony Fok foka@debian.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Show "You must use msvcrt |Suppress "You must use |when building in |msvcrt when building in |Unicode/MBCS mode" error |Unicode/MBCS mode" error |only if |when __MSVCRT__ is defined |!defined(__MSVCRT__) |(-mno-cygwin)
https://bugs.winehq.org/show_bug.cgi?id=39904
Anthony Fok foka@debian.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #53294|Show "You must use msvcrt |include: Suppress "use description|when building in |msvcrt" error in tchar.h |Unicode/MBCS mode" error |when -mno-cygwin is used |only if | |!defined(__MSVCRT__) |
https://bugs.winehq.org/show_bug.cgi?id=39904
Anthony Fok foka@debian.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Suppress "You must use |Spurious "You must use |msvcrt when building in |msvcrt" error even when |Unicode/MBCS mode" error |__MSVCRT__ is defined |when __MSVCRT__ is defined |(-mno-cygwin) |(-mno-cygwin) |
https://bugs.winehq.org/show_bug.cgi?id=39904
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |e034c419533065e82e60a22e02e | |3812335a5b02b Status|UNCONFIRMED |RESOLVED CC| |infyquest@gmail.com Resolution|--- |FIXED
--- Comment #4 from Vijay Kamuju infyquest@gmail.com --- fixed by e034c419533065e82e60a22e02e3812335a5b02b in Wine 1.9.2
https://bugs.winehq.org/show_bug.cgi?id=39904
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mstefani@redhat.com Target Milestone|--- |1.8.x
https://bugs.winehq.org/show_bug.cgi?id=39904
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---
--- Comment #5 from Michael Stefaniuc mstefani@redhat.com --- Removing 1.8.x milestone from bugs included in 1.8.1.
https://bugs.winehq.org/show_bug.cgi?id=39904
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.3.