iphone - How to attach library to ios project? -
i'm developing command line tool app uses applist library. when trying run in on device, error occured:
dyld: library not loaded: /usr/lib/libapplist.dylib referenced from: /usr/bin/testapp reason: image not found
is possible attach libapplist.dylib project package?
all dylibs have installation path inside mach-o header. path placed in application import section linker find dylib. when process launched dyld
searches path dylib.
you can check path this:
otool -d libapplist.dylib
that's dyld
telling - couldn't find dylib. have 2 options:
- place dylib needs be
- change installation path.
if it's dylib can change inside xcode project settings of dylib - search installation directory
. when rebuild dylib , application linking contain new path.
if can't recompile dylib need change manually. here how can it:
install_name_tool -id @executable_path/libapplist.dylib libapplist.dylib
@executable_path
tells linker search dylib application executable located.
Comments
Post a Comment