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