|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Message: 18_______________________________________________
Date: Wed, 2 Jul 2003 15:55:41 -0400
To: Randy Croucher <email@hidden>,
email@hidden
From: Eric Slosser <email@hidden>
Subject: Re: Constructors on static variables
I have a dylib with a static variable declared in it, and I never hit this variable's constructor when I called NSAddImage from my main application.
How do you know?
Is there something I need to call to get these constructors called after getting the mach_header back from NSAddImage?
Your dylib should have a section called "__mod_init_func" in the __DATA segment. That should be where the compiler placed a function to call your global objects' ctors. I don't know if NSAddImage is supposed to call it automatically, or whether you're supposed to do something. (I'm a mach-O newbie).
--
//-------------------------------------------------
email@hidden virtual-fx, inc. (617) 244-9694
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.