Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
- Subject: Re: Xcode 2.3 breaks bundle static object destruction? fuse-cxa-atexit? Help!
- From: Jim Wintermyre <email@hidden>
- Date: Tue, 13 Jun 2006 13:14:14 -0700
What I could tell from looking at the code is that there were two
statics, and the second one depended on the first one being
initialized first. So, it seemed like the first static was either
not being initialized, or it was not being initialized in the correct
location.
Well, AFAIK you shouldn't depend on statics getting initialized in
any particular order...
However, having said that :) I asked about this at one of the Apple
dev kitchens. I needed to have a particular init function run before
other static initializers, and got this response:
"The constructors are run in .o order, so making a new source file
with an an __attribute__((constructor)) function and making sure that
is the first .o file passed to the link line will do what you want.
If that same first .o file also has an __attribute__((destructor))
function, it will be run last (in the framework)."
In practice, this does seem to work for me... YMMV.
Jim
_______________________________________________
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