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:

  1. place dylib needs be
  2. 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

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -