Re: CrossDevelopment + Optimization + stringstream -> crash
Re: CrossDevelopment + Optimization + stringstream -> crash
- Subject: Re: CrossDevelopment + Optimization + stringstream -> crash
- From: Michael Babin <email@hidden>
- Date: Fri, 17 Jun 2005 23:14:42 -0500
On Jun 17, 2005, at 6:22 AM, Christian Rüegg wrote: An application crashes when the cross development 10.2.8 sdk, stringstream and optimization is used.
CrashResult: Executable “CrossPlatformTest” has exited due to signal 10 (SIGBUS).
As posted by Thomas Dibble to this list on January 23, 2005 in a posting with the subject "Re: gcc c++ vs. visual c++ info?":
Are you using 10.2 SDKs? If so, you will need to include the gcc c++ header paths for those SDKs to the command line. If you don't, then practically all c++ stream classes will send a SIGBUS the first time they are used when the optimization level is above "0". In other words, exactly what you're describing.
Specifically, this is what I had to add to my command line (via the XCode Header Search Paths setting) which corrected the crashing completely:
-I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 -I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3/c++ -I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3/c++/ppc-darwin -I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3/c++/backward -I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include
Obviously, change that list as needed if you are using the older 10.2.7 SDK instead of the 10.2.8 SDK.
Don't worry, I didn't do a search to find this info. I had it archived because the same issue bit me. The solution provided solved my problem.
|
_______________________________________________
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