• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Delayed Framework Loading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delayed Framework Loading


  • Subject: Re: Delayed Framework Loading
  • From: Greg Guerin <email@hidden>
  • Date: Fri, 12 Jun 2009 12:38:33 -0700

Dong Feng wrote:

__attribute__((constructor))
static void MyModuleInitializer()
{
    static initialized = 0;
    if (!initialized)
    {
        // Initialization code.
        initialized = 1;
    }
}

int test_export()
{
	return 112233;
}

and each time MyModuleInitializer() is invoked at launch time,
regardless how late test_export() is invoked.

Maybe you're doing it wrong.

Referring to this gcc reference page:

  http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

"The constructor attribute causes the function to be called automatically before execution enters main()."

It sounds like it's doing exactly what you told it to do.

  -- GG

_______________________________________________
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


  • Follow-Ups:
    • Re: Delayed Framework Loading
      • From: Dong Feng <email@hidden>
  • Prev by Date: Re: X-Code and Subversion 1.5 and 1.6
  • Next by Date: Re: X-Code and Subversion 1.5 and 1.6
  • Previous by thread: Re: Delayed Framework Loading
  • Next by thread: Re: Delayed Framework Loading
  • Index(es):
    • Date
    • Thread