• 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: Fritz Anderson <email@hidden>
  • Date: Fri, 8 Aug 2008 14:02:06 -0500

On 8 Aug 2008, at 1:53 PM, Mark Wagner wrote:

On Fri, Aug 8, 2008 at 07:55, Fritz Anderson <email@hidden> wrote:
On 7 Aug 2008, at 4:36 PM, Tor Langballe wrote:

I have some global variables in a source file that use other global
variables in another source file.
Since they are dependent on being initialized in the right order, I have
to make sure the link order is correct.

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

This says nothing about the order the globals are initialized, though. If you need a specific ordering, you need to explicitly initialize the variables in code.

I'd thought so, myself, but in Googling the problem, I had the impression that Xcode engineers, at least for previous versions, believed link order controlled initialization order.


I do agree that if you want things to happen one after the other, the way to do that is to write code that makes them happen, one after the other. This link-order business says "implementation detail" to me, and I should have said so in the first place.

	— F

 --
Fritz Anderson -- Xcode 3 Unleashed: Now Available -- http://x3u.manoverboard.org/



_______________________________________________
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


References: 
 >pragma to ensure link order (From: Tor Langballe <email@hidden>)
 >Re: pragma to ensure link order (From: Fritz Anderson <email@hidden>)
 >Re: pragma to ensure link order (From: "Mark Wagner" <email@hidden>)

  • Prev by Date: Xcode gets into wonky states where menu bar and some windows disappear
  • Next by Date: Re: PackageMaker 3 Question
  • Previous by thread: Re: pragma to ensure link order
  • Next by thread: Re: pragma to ensure link order
  • Index(es):
    • Date
    • Thread