wine/windows/tchar.h - error "You must use msvcrt when building in Unicode/MBCS mode"

Ilya Konstantinov future at
Mon Jul 30 18:56:34 CDT 2012

In 2004, somebody has asked a question:

The reply from Alexandre was:

> > 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.

>From what I see, today the situation is still the same.
Is it simply because nobody has dealt with it?

In any case, I've implemented Alexandre's change locally (in tchar.h).

Now I'll be trying to use winelib's msvcrt with my code. It seems like a
"damned if you do,
damned if you don't" kind of thing. One issue I'm having now is wine/msvcrt
being in the
system includes path, thus causing libstdc++ to load winelib's <wchar.h>.
Of course,
this didn't go too well :-)

My goal is to have a Linux app that's, generally speaking, a native app. I
have the cooperation
of the codebase developers, so they can follow directions to keep the code
reasonably portable.
At the same time, I don't want to burden them with mundane changes, so if
Winelib can bridge
over the two worlds sometimes, it'd be great.

Perhaps we can have tchar.h operate in two modes:
1) a MSVCRT mode, where all the MSVCRT goodies are available,
2) a glibc mode, where it tries to map as many functions to glibc as
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wine-devel mailing list