• 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: using a dylib in the appfile.app/Contents/Frameworks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using a dylib in the appfile.app/Contents/Frameworks?


  • Subject: Re: using a dylib in the appfile.app/Contents/Frameworks?
  • From: Peter O'Gorman <email@hidden>
  • Date: Fri, 23 May 2008 18:01:56 -0500

Tae-Won Ha wrote:

> I've got a custom .dylib file. I added it to the xcode project and
> copied the necessary header files. Everything works fine. Now since
> this dylib file is a custom one, I want to include it in the app file
> itself, as far as I understand, such files should be in the
> appfile.app/Contents/Frameworks. I added a Copy Files phase, set it to
> Framework, and drag and dropped the dylib from the Groups & Files
> column to the Copy Files. When I build, the dylib file gets copied to
> the Frameworks folder. However when I remove the original dylib file
> from $HOME/lib, where it was as I built, the app just crashes. If I
> move the dylib file back to $HOME/lib, it works again. What should I
> do to force the app to use the dylib file in the
> appfile.app/Contents/Frameworks?


I assume the crash message has "Image not found". The install_name of
shared libraries on Mac OS X is usually an absolute path, if you move
it, then the program/library that needs it can not find it.

Look for documentation on install_name_tool and setting the install_name
to a relative path beginning with @executable_path. e.g
http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachOTopics/Articles/loading_code.html

Peter
--
Peter O'Gorman
http://pogma.com
 _______________________________________________
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: 
 >using a dylib in the appfile.app/Contents/Frameworks? (From: "Tae-Won Ha" <email@hidden>)

  • Prev by Date: using a dylib in the appfile.app/Contents/Frameworks?
  • Next by Date: Re: using a dylib in the appfile.app/Contents/Frameworks?
  • Previous by thread: using a dylib in the appfile.app/Contents/Frameworks?
  • Next by thread: Re: using a dylib in the appfile.app/Contents/Frameworks?
  • Index(es):
    • Date
    • Thread