Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Libstdc++ problems



I seem to be running into some problems with my configuration of Xcode and
the Standard C++ Library.

The symptom of the problem shows up when I try to use the 'string' class,
and specifically when I use the 'c_str()' method to access the 'C' string of
the class. It always returns a pointer to the beginning of the class
structure +1. The address of the 'C' string appears to be at the head of the
structure and if I cast that as a pointer to a char* I see the string.
However, 'c_str()' neither casts it or even points to the correct address,
its off by 1. This I can work around by using '.data()' instead, which at
least returns the correct address.

The other symptom I see is an exception being thrown anytime the
'.replace()' method is called, since this is used in other methods such as
'.substr()' I can't work around this.

I have tried both the static lib and dynamic lib and both show the same
results. I turned on both Symbols Hidden By Default, and Inline Functions
Hidden.

I'm sure there is a setting I'm missing here and I'm hoping someone else has
seen and fixed this.

Thanks In Advanced.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.