• 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: DYLD_LIBRARY_PATH etc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DYLD_LIBRARY_PATH etc


  • Subject: Re: DYLD_LIBRARY_PATH etc
  • From: Miklós Fazekas <email@hidden>
  • Date: Sat, 23 Apr 2005 20:24:47 +0200


On Apr 23, 2005, at 6:45 PM, email@hidden wrote:

Hi All


Please help as I am almost going insane :-(


FYI I have been around the houses a few times on 

this one. I've looked at various postings and web 

pages recommended on this list but I cannot find a 

good solution. The articles etc by ‘Wolf’ Rentzsch 

and Robert Chin are excellent but don't really 

deal with my problem.


I have a set of libraries which I want to bundle 

with my application so that it is a drag and drop 

install. Unfortunately, the libs are precompiled 

and I have no access to the source code.


I know I could do an almighty hack with 

install_name _tool  but I have about 40 libraries 

and there are lots of interdependencies :-( I 

really am hoping there is a better way.


One idea I (probably stupid) idea is to set 

DYLD_LIBRARY_PATH at runtime. Is this possible?


You cannot do this as the dynamic linker reads these variables at the time the application launches, and not each time a new framework is loaded.

You have two options:
- modify install paths.
- preload all required frameworks with NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME then load the bundle really using it.  [We have a proxy bundle that loads all frameworks then loads the real bundle, and the proxy just calls the real one].

We use:
NSAddImage (path, NSADDIMAGE_OPTION_RETURN_ON_ERROR | NSADDIMAGE_OPTION_WITH_SEARCHING | NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME);
to load the frameworks one by one.

Regards,
Miklós
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Java vs. Objective-C for Cocoa
  • Next by Date: Cocoa Apps on Windows was: Re: Java vs. Objective-C for Cocoa
  • Previous by thread: Re: Auto Save - location
  • Next by thread: Problem with: didCompleteLayoutForTextContainer
  • Index(es):
    • Date
    • Thread