extern void MyInitFunc(void) __attribute__ ((constructor));
extern void MyTermFunc(void) __attribute__ ((destructor));
void MyInitFunc(void)
{
printf("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n");
}
void MyTermFunc(void)
{
}
I put this in a .c file which is present in the main application (not a library or framework). It doesn't get called as per the GCC docs. Am I missing something important? This is on XCode 3.2 on Snow Leopard.