• 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: linking after dependency has been modified
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linking after dependency has been modified


  • Subject: Re: linking after dependency has been modified
  • From: Christopher Kempke <email@hidden>
  • Date: Sun, 7 Aug 2005 12:07:42 -0700

I, too, am having all manner of problems with static library linking. The doc implies that it will find these things automatically, but maybe I'm reading something into it that's not actually there.

I have static library "S", which I want to use in application "A" (everything's nibless Carbon, here). S has the same build configurations as A.

- I add the S.xcodeproj to the "External Frameworks and Libraries" of A.
- I set S as a dependency of A (why isn't this automatic?)
- I disclose S.xcodeproj, select the S.a file, and check the little checkbox (why isn't this automatic?)
- I turn Zerolink off - it's never worked for me with a static library involved - it seems to prevent the static lib from being found, even after the next step.
- I clean + build. It builds S, then builds A, then BOOM! Link error because it can't find S.a, even though it just built it. (Why isn't this automatic?)
- In order to get this to work, I have to go into the build settings, and specify the location of S.a in the "Library Search Paths", which is a pain now in 2.1, since it's in a different place for each build configuration. (Is there a variable for the build configuration name? That would make it easier.)


I don't understand why all these steps are involved - a casual reading of the documentation implies this should be happening automatically (and certainly in Codewarrior it was "Add the static lib project. Mark it as used by the main project. Done"). I'm pretty sure I'm missing at least one step above- I've been fighting to find a stable way to do this for literally weeks.

And apparently I'm still missing a step, because this is incredibly fragile. XCode seems to be very, very, very bad about keeping track of what files have changed, especially in the sub-project. It will work for a few builds, then it will stop noticing changes to files, and I'll have to do a clean before I can get it to recognize changes again.

Is there an easier/more automatic way to make an project dependent on a static lib built by another? This is an incredibly simple configuration (application that uses an application framework in a static library), but I spend hours and hours just trying to keep it compiling and linking; it seems every change I make, anywhere, to anything, causes it to throw link errors and I have to start over again.

_______________________________________________
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: duplicate a target?
  • Next by Date: Re: linking after dependency has been modified
  • Previous by thread: Re: duplicate a target?
  • Next by thread: Re: linking after dependency has been modified
  • Index(es):
    • Date
    • Thread