Fwd: Dynamic Linking Error - Xcode 4
Fwd: Dynamic Linking Error - Xcode 4
- Subject: Fwd: Dynamic Linking Error - Xcode 4
- From: Rutvik Choudhary <email@hidden>
- Date: Tue, 07 Aug 2012 16:03:46 -0500
---------- Forwarded message ----------
From:
Rutvik Choudhary <email@hidden>
Date: Tue, Aug 7, 2012 at 3:45 PM
Subject: Re: Dynamic Linking Error - Xcode 4
To: Jens Alfke <
email@hidden>
There is an "Dynamic Library Install Name" option in the "Build Settings" tab, is that where I put " the @executable_path/libBox2D.2.1.0.dylib" text? And also, do I do this for every library included?
On Tue, Aug 7, 2012 at 3:39 PM, Jens Alfke
<email@hidden> wrote:
On Aug 7, 2012, at 1:20 PM, Rutvik Choudhary <
email@hidden> wrote:
> dyld: Library not loaded: libBox2D.2.1.0.dylib
> Referenced from: /Users/****/Documents/Xcode Projects/ProjectName/.../ProjectName.app/Contents/MacOS/ProjectName
> Reason: image not found
My guess is that you need to fix up the 'install name' of the library — the path at which it should be searched for when loaded. You can see the existing path by running "otool -D libBox2D.2.1.0.dylib". The "install_name_tool" will replace the install name; see its man page. IIRC, it should be "@executable_path/libBox2D.2.1.0.dylib", which will tell the loader to look for it relative to the app's executable.
(It's always been a mystery to me why Xcode doesn't do this for you; it makes using 3rd party frameworks or dylibs really tricky until you learn the ropes.)
—Jens
_______________________________________________
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