(wx-2.8.7) wxString operator <<(int) does not work under windows

Milan Babuskov milanb at panonnet.net
Mon Dec 31 00:46:53 PST 2007


JC Francois wrote:
>     wxString Str;
>     int Int = 10;
>     float Float = 3.14;
>     Str << wxT("Int = ") << Int << wxT(" Float = ") << Float;
>     wxLogDebug(Str);
> 
> Ouptut under Linux: Debug: Int = 10 Float = 3.140000
> Output under Windows: Debug: Int =  Float =
> 
> I know how to work around the problem (using wxString.Printf()) but it 
> requires more line  and the code is less readable.
> 
> Is anybody else experiencing this?

This looks like one GCC bug I know of. It shows up when you use GCC 3.4 
and precompiled headers. Either turn off precomp. headers or use some 
other GCC version (3.3.x are ok, and 4.x are also ok).

-- 
Milan Babuskov
http://www.flamerobin.org




More information about the wx-users mailing list