• 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
Embedded Library in Cocoa App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Embedded Library in Cocoa App


  • Subject: Embedded Library in Cocoa App
  • From: John Nairn <email@hidden>
  • Date: Thu, 19 Jan 2012 11:49:12 -0800

I am trying to distribute a Cocoa app that launches my own c++ binaries and those binaries link to a dynamic library, but for those users that don't know how to download, compile, and install the needed dynamic library, I want to include in in the app resource. I did the following:

1. Compile Mac .app and store binaries for my c++ code and the needede library in a "binaries" folder in the app.

2. When my c++ code is compiled, it is linked with my installed library which is at /usr/local/lib

3. When running on Mac that does not have the installed library, I launch my c++ code using an NSTask and set the DYLD_LIBRARY_PATH environment variable to the path to the binaries folder in my application that has the needed library.

On Macs without the installed library, it fails with

     dyld: unknown required load command 0-x80000022

I had this scheme working before and don't know what has now stopped it from working?

John Nairn

---------------
John Nairn (1-541-737-4265, FAX:1-541-737-3385)
Professor and Richardson Chair
Web Page: http://www.cof.orst.edu/cof/wse/faculty/Nairn/
FEA/MPM Web Page: http://oregonstate.edu/~nairnj


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Embedded Library in Cocoa App
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: NSTask terminates when NSApplication exits
  • Next by Date: Re: NSTask terminates when NSApplication exits
  • Previous by thread: Detecting Fn key (as modifier)
  • Next by thread: Re: Embedded Library in Cocoa App
  • Index(es):
    • Date
    • Thread