Re: How to properly add libraries
Re: How to properly add libraries
- Subject: Re: How to properly add libraries
- From: Jonny Yu <email@hidden>
- Date: Sat, 10 Dec 2011 12:47:36 +0800
My wild guess is the boost dylib doesn't have proper install name.
You can use otool -L libboost_system.dylib to see the install name
Sent from my iPhone
On 2011-12-10, at 上午10:30, Kelvin Chung <email@hidden> wrote:
> I'm having trouble getting my program to run in XCode. My project relies on a few boost libraries that use automatic linking (boost::thread, etc). Suppose that the path to the boost libs is "~/Downloads/boost/lib". If I add that to the library search path, then the build fails. If I go into "Link Binary With Libraries" in "Build Phases" and add the specific libs required (libboost_system.a and libboost_thread.a) from the lib directory, the code compiles, but crashes on running. GDB gives these warnings:
>
> warning: Unable to read symbols for libboost_system.dylib (file not found).
> warning: Unable to read symbols from "libboost_system.dylib" (not yet mapped into memory).
> warning: Unable to read symbols for libboost_thread.dylib (file not found).
> warning: Unable to read symbols from "libboost_thread.dylib" (not yet mapped into memory).
>
> Then it crashes with this:
>
> dyld: Library not loaded: libboost_system.dylib
> Referenced from: (path redacted)
> Reason: image not found
>
> The .dylibs are found in the same place as the .a files, so they definitely exist. What am I doing wrong? _______________________________________________
> 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
_______________________________________________
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