delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/25/18:56:02

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <24212351.post@talk.nabble.com>
Date: Thu, 25 Jun 2009 15:55:43 -0700 (PDT)
From: Match Point <qihongwang AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: How to build gcc to support wchar_t and wstring on Cygwin
In-Reply-To: <4A43F4C9.8020706@gmail.com>
MIME-Version: 1.0
References: <24207403 DOT post AT talk DOT nabble DOT com> <f60fe000906251215m50ebd3eetc9b58f5cc17bec32 AT mail DOT gmail DOT com> <4A43F4C9 DOT 8020706 AT gmail DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Absolutely.  c++config.h which control the definition of _GLIBCXX_USE_WCHAR_T
is part of libstdc++.
c++config.h locates in a architecture related directory like
c++/4.4.0/i686-pc-cygwin/bits. So it must be a dynamically generated file
during build process. I found c++config in fresh source code, that probably
is used as a template to generate c++config.h. According what the build
process decide not to define
_GLIBCXX_USE_WCHAR_T? Just the os type? Is there any other detection? I
guess no. When I built icu, the configure messages shows 
checking wchar.h usability  ..... yes
checking wchar.h presence ..... yes
checking for wchar_t  ... yes
checking size of wchar_t   2

Maybe icu use it's own wchar_t.  Does anyone know these?



Dave Korn-6 wrote:
> 
> Mark J. Reed wrote:
>> On Thu, Jun 25, 2009 at 1:10 PM, Match Point
>>> wstring is not supported on my Cygwin 1.5.25. When I  declare a
>>> 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.
>> 
>> No, to fix that you have to convince the newlib developers to add
>> wstring support to newlib.
>> 
>>> _GLIBCXX_USE_WCHAR_T is still not defined.
>> 
>> Cygwin does not use glibc.
> 
>   Whoah!  Hang on there!  Cygwin does indeed use newlib, not glibc; but
> GLIBCXX_ #defines in GCC don't relate to glibc, they relate to
> libstdc++-v3.
> 
>     cheers,
>       DaveK
> 
> 
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> 
> 
> 

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


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019