• 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: C++ standard libs errors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ standard libs errors


  • Subject: Re: C++ standard libs errors
  • From: Krassimir Simeonov <email@hidden>
  • Date: Sun, 7 Feb 2010 14:23:47 -0800

Hmm ... I couldn't find any of those defined.


On Feb 7, 2010, at 2:15 PM, Chris Espinosa wrote:

>
> On Feb 7, 2010, at 2:07 PM, Krassimir Simeonov wrote:
>
>> Hi,
>>
>> When I run the following program on Win and Linux it produces output of
>> 22
>>
>> #include <iostream>
>>
>> class MyStreamBuf : public std::streambuf
>> {
>> protected:
>> 	int overflow ( int c = EOF )
>> 	{
>> 		std::cout << static_cast<char>(c);
>> 		return c;
>> 	}
>> };
>>
>> int main( int argc, char** argv )
>> {
>> 	std::cout << 2;     // ok
>> 	MyStreamBuf myStreamBuf;
>> 	std::ostream myStream(&myStreamBuf);
>> 	myStream << 2;     // exception
>> }
>>
>> When I compile and run it in XCode (3.2.1 - MacOS X 10.6) it throws an exception when I try to call the operator <<(int).
>>
>> I traced this to the point where myStream._M_num_put is NULL.
>>
>> Does anyone know how to work around this issue?
>
> In your Project (or Target) build settings, in the Search bubble enter
>
>  GLIBCXX_DEBUG
>
> If you find it defined to 1 in Preprocessor Macros or Other C Flags, delete the definition. Same for _GLIBCXX_DEBUG_PEDANTIC.
>
> 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

  • Follow-Ups:
    • Re: C++ standard libs errors
      • From: email@hidden
References: 
 >C++ standard libs errors (From: Krassimir Simeonov <email@hidden>)
 >Re: C++ standard libs errors (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: C++ standard libs errors
  • Next by Date: Re: Is Xcode supported on OS X server?
  • Previous by thread: Re: C++ standard libs errors
  • Next by thread: Re: C++ standard libs errors
  • Index(es):
    • Date
    • Thread