• 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: dylib in application bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dylib in application bundle


  • Subject: Re: dylib in application bundle
  • From: Jonathan Taylor <email@hidden>
  • Date: Mon, 19 May 2014 15:04:29 +0100

From: Andy Duplain <email@hidden>
Date: Mon, 19 May 2014 13:56:09 +0100

> Can you post your current script?

Script below. It should be identical to that in the link from my original message, except I added some quotes in an attempt to deal with spaces in filenames.



#!/bin/bash
EXECFILE="${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"
LIBPATH="${BUILT_PRODUCTS_DIR}/${SHARED_SUPPORT_FOLDER_PATH}"
NEWLIBPATH="@executable_path/../SharedSupport"

# space separated list of libraries
TARGETS="libPvAPI.dylib"
for TARGET in ${TARGETS} ; do
LIBFILE="${LIBPATH}/${TARGET}"
TARGETID=`otool -DX "${LIBPATH}/$TARGET"`
NEWTARGETID="${NEWLIBPATH}/${TARGET}"
install_name_tool -id "${NEWTARGETID}" "${LIBFILE}"
install_name_tool -change "${TARGETID}" "${NEWTARGETID}" "${EXECFILE}"
done





On 19 May 2014, at 13:22, Jonathan Taylor wrote:

> I am trying to include a 3rd-party dylib in my application bundle. I have added a build step in which the file is copied across, and then it is my understanding that I should run a script to make some adjustments following the file move:
> http://ynniv.com/blog/2006/02/deploying-app-that-use-dylibs-on-mac.html
>
> When I do this, everything works fine when building from scratch, with no application present in the build folder. However when I recompile after an incremental change, I get the following error
> dyld: Library not loaded: libPvAPI.dylib
>   Referenced from: /Path/To/My/Application
>   Reason: image not found
>
> The build results window does seem to indicate that my script has been run in the incremental case (which I imagine is correct). (Workaround is to delete the application from the build folder, forcing it to be recreated from scratch)
>
> Can anybody advise what the problem is, or how I can diagnose it? I am outside my area of expertise here, I just wanted to include the dylib in order to avoid requiring it to be installed separately on the user's system.
>
> Thanks for any advice
> Jonny.


 _______________________________________________
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


  • Follow-Ups:
    • Re: dylib in application bundle
      • From: Jonathan Taylor <email@hidden>
References: 
 >dylib in application bundle (From: Jonathan Taylor <email@hidden>)

  • Prev by Date: RE: dylib in application bundle
  • Next by Date: SVN support in Xcode 5.1.1
  • Previous by thread: RE: dylib in application bundle
  • Next by thread: Re: dylib in application bundle
  • Index(es):
    • Date
    • Thread