• 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 19:08:24 -0800

Awesome!

Thanks, Chris and Dave for your quick help!

k.

p.s. The GLIBCXX_DEBUG and GLIBCXX_DEBUG_PEDANTIC were in my target settings and not in my project settings which confused me initially
On Feb 7, 2010, at 3:50 PM, email@hidden wrote:

>
> On Feb 7, 2010, at 5:23 PM, Krassimir Simeonov wrote:
>
>> 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
>
>
> I teach C++ to undergrads so I made a screencast for my students showing them how to do it:
>
> http://dl.dropbox.com/u/616225/Xcode-10.6-debug-fix.mov
>
> Chris, can you say if this is going to be fixed in an updated Xcode for Snow Leopard or are we stuck with this until the next OS release?
>
> Thanks,
> Dave
>

 _______________________________________________
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: 
 >C++ standard libs errors (From: Krassimir Simeonov <email@hidden>)
 >Re: C++ standard libs errors (From: Chris Espinosa <email@hidden>)
 >Re: C++ standard libs errors (From: Krassimir Simeonov <email@hidden>)
 >Re: C++ standard libs errors (From: email@hidden)

  • Prev by Date: Re: C++ standard libs errors
  • Next by Date: Is there a UTI for OPML files?
  • Previous by thread: Re: C++ standard libs errors
  • Next by thread: Programs' following -F not found
  • Index(es):
    • Date
    • Thread