Re: dylib in application bundle
Re: dylib in application bundle
- Subject: Re: dylib in application bundle
- From: Jonathan Taylor <email@hidden>
- Date: Tue, 20 May 2014 12:29:49 +0100
I should say, this is on Xcode 3.2.6. Sorry, should have said that before, probably important! Briefly experimenting, I think things work ok on 5.1.1, but would be nice to keep backward compatibility.
Workaround for now is to manually delete and re-copy the .dylib from the build product, but would be nice to understand what's actually going on here...
On 19 May 2014, at 15:04, Jonathan Taylor wrote:
> 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