• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 2 byte wchar_t...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2 byte wchar_t...


  • Subject: Re: 2 byte wchar_t...
  • From: Chris Espinosa <email@hidden>
  • Date: Fri, 23 Sep 2005 09:06:56 -0700


On Sep 23, 2005, at 8:45 AM, David Spells wrote:

I think that I already know the answer to this problem but I thought that I would ask anyway. Is there a way to have 2 byte wchar_t instead of a 4 byte that would be used in std::wstring, etc...?

Yes and no.

You can set a compiler flag (-fshort-wchar ) that will build any compilation unit using 2-byte wchar_t.

But it won't link with any other system libraries that offer wchar_t ABIs (few as they are) because of the size mismatch.

So you can use it for isolated code units and internal implementation, or very controlled communication between units, but not in a real systemic way. This is a general problem in the C++ community as the standard declines to state the width of wchar_t and the Gnu, Windows, and CodeWarrior environments all go different directions.

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >2 byte wchar_t... (From: "David Spells" <email@hidden>)

  • Prev by Date: Re: NSObjCRuntime.h won't compile? Or .mm files?
  • Next by Date: Errors trying to compile HID support?
  • Previous by thread: 2 byte wchar_t...
  • Next by thread: RE: 2 byte wchar_t...
  • Index(es):
    • Date
    • Thread