[gcc-help] std::wcout fails to compile

Darko Miletic darko@uvcms.net
Tue Dec 14 12:15:00 GMT 2004

Lourens Janse van Rensburg wrote:
> G'day all!
> ---------
> #include <iostream>
> int main()
> {
> 	std::wcout << std::endl;
> }
> ----------
> $ g++ a.cpp
> a.cpp: In function `int main()':
> a.cpp:6: error: `wcout' undeclared in namespace `std'

On cygwin and some other platforms unicode is not supported in 
libstdc++. There is nothing you can do except to change standard 
template library. On windows (cygwin) you can use STLport 
(www.stlport.org) instead of libstdc++ that has support for unicode. You 
could try the same thing on other problematic unix systems since STLport 
is portable.


More information about the Gcc-help mailing list