static initializers do not get run in dylibs with gcc 3.3
static initializers do not get run in dylibs with gcc 3.3
- Subject: static initializers do not get run in dylibs with gcc 3.3
- From: "Jan Hardenbergh" <email@hidden>
- Date: Mon, 6 Dec 2004 11:47:28 -0500
- Thread-topic: static initializers do not get run in dylibs with gcc 3.3
Title: static initializers do not get run in dylibs with gcc 3.3
I am having a problem with static initializers. This problem is well documented if you Google:
"mac osx gcc static initializers" or variations. It works on about 1/4 of the classes. I cannot
discern which ones it will or will not work with. The static is instantiated if I call hackMyClass()
My flavor of the Problem is
class MyClass {
MyClass()
{
do some init
}
...
}
static MyClass myClass;
hackMyClass() { return; }
This works on Linux with gcc 3.3, MSVC++, and Solaris.
This was rumored to have been fixed with GCC 3.3, but, it is not for me. I have tried all fo the link flags that seemed to make any sense.
Any ideas?
YON - Jan C. Hardenbergh
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden