• 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
Framework dependencies/linking question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Framework dependencies/linking question


  • Subject: Framework dependencies/linking question
  • From: Greg Hurrell <email@hidden>
  • Date: Wed, 1 Mar 2006 04:15:53 +0100

I've got two frameworks that I build in a shared built products location. Both of them are intended to be embedded inside an application and have install paths set that start with:

@executable_path/../Frameworks/

Framework A links against Framework B. When I try to make a Bundle C which links only against Framework A I get warnings at link time that look like this:

/usr/bin/ld: warning can't open dynamic library: @executable_path/../ Frameworks/FrameworkB.framework/Versions/A/FrameworkB referenced from: /Users/ghurrell/build/Release/FrameworkA.framework/FrameworkA (checking for undefined symbols may be affected) (No such file or directory, errno = 2)

The warning message says "no such file" but the frameworks obviously *are* in the shared built products directory. Evidently the linker is not looking in the shared built products directory but is instead looking somewhere else (evidently, "@executable_path/../Frameworks/"; but what does it consider to be the executable_path in this case? the file in the bundle at "Contents/MacOS/Executable"? the executable in Framework A at "Versions/A/Executable"?)

To make these errors go away I have to link Bundle C against Framework B, even though the bundle makes no reference to any symbols in it. My question is, is this normal behaviour?

Setting FRAMEWORK_SEARCH_PATHS to the shared built products location doesn't help. I also tried setting up symbolic links to the framework in the various places that the linker might expect to find it (eg. at "@executable_path/../Frameworks/", trying a few different values for "executable_path") but that didn't eliminate the warnings either.

It's not a huge problem; I'm just trying to refine my understand of how frameworks can get linked.

For reference, here is the link command shown in the build results window at the time warning

/usr/bin/gcc-4.0 -o /Users/ghurrell/build-intermediates/Product.build/ Release/General.prefPane.build/Objects-normal/ppc/General -L/Users/ ghurrell/build/Release -F/Users/ghurrell/build/Release -filelist / Users/ghurrell/build-intermediates/Product.build/Release/ General.prefPane.build/Objects-normal/ppc/General.LinkFileList - framework FrameworkA -framework Cocoa -arch ppc -Wl,-x -bundle - mmacosx-version-min=10.3 -Wl,-dead_strip -isysroot /Developer/SDKs/ MacOSX10.3.9.sdk

Best wishes,
Greg


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: GUI builder
  • Next by Date: Re: Embedding frameworks across projects
  • Previous by thread: GUI builder
  • Next by thread: file.asm for PPC not Intel
  • Index(es):
    • Date
    • Thread