This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to build gcc to support wchar_t and wstring on Cygwin


Hi,

wstring is not supported on my Cygwin 1.5.25. When I a declare wstring
variable my g++ 3.4.4 complains wstring is undeclared. After reading some
posted message I figured out wstring is not supported on Cygwin 1.5 or even
1.7. To fix this I have to rebuild entire gcc. So I downloaded gcc 4.4.0 and
built it on my Cygwin. I didn't setup --enable-wchar_t for libstdc++,
because the default value is enabled. I didn't have any configure options.
The build was successful. But wstring still could not pass the compilation
of g++ 4.4.0. I checked libstdc++ head file
../c++/4.4.0/i686-pc-cygwin/bits/c++config.h, _GLIBCXX_USE_WCHAR_T
is still not defined. This leads to no "typedef basic_string<wchar_t> 
wstring;" in stringfwd.h. In my c++config.h on my Linux machine with gcc
4.1.2, _GLIBCXX_USE_WCHAR_T is defined. So I don't have wstring support
problem on Linux. My question now are
1. Is it possible to have Cygwin 1.5 or 1.7 to support wstring?
2. If it's possible how to build entire gcc or just libstdc++ if that works.
Seems like Mingw works. But I can't use that. My program have to run on both
Cygwin and Linux.

I prefer the formal approach instead of hacker one. I have a big program
which depends on other big libraries. Those libraries are also needed to
compile. 

Best regards,

Qihong Wang 
-- 
View this message in context: http://www.nabble.com/How-to-build-gcc-to-support-wchar_t-and-wstring-on-Cygwin-tp24187646p24187646.html
Sent from the gcc - Help mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]