Unicode functions

steve.lustbader at philips.com steve.lustbader at philips.com
Thu Sep 12 09:42:57 CDT 2002


I think there is issue with _T(x).  I have this line in my Windows app
that I'm compiling with WineLib (I'm using -fshort-wchar):

const TCHAR *Name() const { return _T("my_name"); };

The compiler gives me an error of:

cannot convert `const __wchar_t *' to `const
TCHAR *' in return

It similarly complains about converting _T("foo") to a const WCHAR *.
Both of these things work under Windows.

Changing the definition of _T(x) from L##x to (TCHAR *) L##x avoids
these problems, but then something like _T("foo") _T("bar") doesn't
concatenate those strings like it does in Windows.

-Steve





--- steve.lustbader at philips.com wrote:
> Are _tprintf and it's related functions (_ftprintf,
> _stprintf) implemented?  I found a tchar.h in the
> source tree that defines these functions, but it
> wasn't in my /usr/local/include/wine directory.

I'm fixing the build process to install the header.
For now you can copy it manually to the
/usr/local/include/wine directory.
Actually _ftprintf and _stprintf are not functions,
but macros which are mapped in tchar.h to
corresponding ASCII or Unicode function. The
underlying functions should be implemented.

> These functions aren't important for wine, since
> they're simply defined as the ASCII or Unicode
> version, but they are important for WineLib.
>
> What is the overall status of using Unicode with
> WineLib?  What needs to be defined and what headers
> need to be included to get the functionality from
> Windows' tchar.h (_T(), TCHAR, the above functions,
> etc)?

Unicode is supported relatively well in Wine. Please
report if you have any issues with it.

Andriy

__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com







More information about the wine-devel mailing list