Jon Griffiths wrote:
>
> Hi,
>
> > Use gcc 2.97 with -fshort-wchar.
>
> Well, this was for VWCL, and I wanted to make the price of entry as low as
> possible for the existing win programmers, so I've gone for another solution;
> since its a C++ framework its sufficient to use
>
> #define VTEXTW(str) wine_unicode_text(L##str)
>
> and give -fwritable-strings, which is working. I'll put CVS gcc on the ever
> increasing list of things to look at in the future :-)
Well, if you're willing to modify your code then you should probably
use WINE_UNICODE_TEXT. That's because:
* it supports both chars and strings, i.e. you can write:
WINE_UNICODE_TEXT('c') as well as WINE_UNICODE_TEXT("string")
I agree that it's a bit ugly but I had to do it because that's what
they do with OLESTR in the MFC! In C I believe you will have warnings
(but at least it will compile and do the right thing). You might want to
have two macros instead.
* it will do the right thing when you switch to g++ 2.97, i.e. it will
become L##x
Of course the name is a bit long (and it's WINE specific) so you
could do:
#define VTEXTW(x) WINE_UNICODE_TEXT(x)
--
François Gouget
[EMAIL PROTECTED]