• 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: pragma to ensure link order
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pragma to ensure link order


  • Subject: Re: pragma to ensure link order
  • From: Greg Guerin <email@hidden>
  • Date: Fri, 8 Aug 2008 10:33:39 -0700

Fritz Anderson wrote:

The order of the source files in the Compile Sources phase of the target controls link order. Drag them into the order you need.

Or write a C function that initializes the globals in the correct sequence.


Whenever I want to ensure a specific sequence, I put it in a function and rely on the fundamental execution order of statements. This is especially useful when there are no guarantees about how the product will be built, or on what platform. An init() function makes the initialization sequence part of the program itself, instead of being an unpredictable side-effect of the production process.

  -- 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


  • Prev by Date: Re: Xcode 3.1 Debugger Problems
  • Next by Date: Re: debugging 'continue' -- any way to trigger a switch-application event back to the tested app
  • Previous by thread: Re: pragma to ensure link order
  • Next by thread: gcc 4.2 not the default?
  • Index(es):
    • Date
    • Thread