• 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: embedded projects, dependencies, and linking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: embedded projects, dependencies, and linking


  • Subject: Re: embedded projects, dependencies, and linking
  • From: Tobias Ford <email@hidden>
  • Date: Wed, 18 Jul 2007 23:37:16 -0500

Argh! This was frustrating! This is the solution post so that I don't look like a total idiot. I know it came off as a complete newbie question. I'm far from being tops when it comes to compiler and linker configurations so I didn't realize this...

!!! When building the final application with flat libraries, the order of the files in the xCode target link group actually matters !!!
!!! Consequently, files in this group are the only files in the project that shouldn't be sorted alphabetically !!!


:)

I always just assumed that the linker would have scanned everything to build a lookup table first before performing the actual link. I also know that this is documented somewhere and that somewhere/ sometime someone probably told me this...

I really wish that I had either read it, remembered, or listened :)

Anyway, I reversed the link order according to parental dependency in my project building scripts and everything works fine now as I expected to.

On Jul 15, 2007, at 5:36 PM, Tobias Ford wrote:

Our suite of applications is built using a hierarchy of libraries that depend on their "parent" libraries.

For example, we have:

engine
	clientEngine (depends on sharedEngine)
		application
			FinalApplications
		library
			finalLibraries.a
	serverEngine (depends on sharedEngine)
		application
			FinalApplications
		library
			finalLibraries.a
	sharedEngine
		application
			FinalApplications
		library
			finalLibraries.a

game
	clientGame (depends on sharedGame)
		application
			FinalApplications
		library
			finalLibraries.a
	serverGame (depends on sharedGame)
		application
			FinalApplications
		library
			finalLibraries.a
	sharedGame (depends on sharedEngine)
		application
			FinalApplications
		library
			finalLibraries.a

When building the final applications, I'm stuck with libraries either having undefined symbols for their parents or running into multiple definitions that generate warnings. This appears to depend on the final application and what the libs tend to instantiate. In other word, If I trim the dependencies down for one app and then can't link another final application. I restore dependencies for another and generate warnings in others that were fine previously fine.

Does anyone know the best way (xcode wise) to set this up so there aren't any warnings in the final build? Is their a linker option that I should use?

I would prefer that the child libraries don't require linking against their parents in any situations and that the final applications instead link against all of the libraries that they reference. Unfortunately I haven't been able to arrange everything to get this to happen yet.

Thanks in advance.

-------------------
Tobias Ford...
tobias1482 'at' mac.com
tford 'at' spacetimestudios.com
-------------------
Sr Programmer @ space time studios for a generic space game mmo





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden

------------------- Tobias Ford... tobias1482 'at' mac.com tford 'at' spacetimestudios.com ------------------- Sr Programmer @ space time studios for a generic space game mmo





_______________________________________________
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: embedded projects, dependencies, and linking
      • From: Jack Repenning <email@hidden>
References: 
 >embedded projects, dependencies, and linking (From: Tobias Ford <email@hidden>)

  • Prev by Date: Re: replacement for CW compare?
  • Next by Date: Problem using static floats
  • Previous by thread: embedded projects, dependencies, and linking
  • Next by thread: Re: embedded projects, dependencies, and linking
  • Index(es):
    • Date
    • Thread