objective c - How to link a dynamic library Xcode 5 -
objective c - How to link a dynamic library Xcode 5 -
can point me tutorial shows how link dynamic library. created dynamic library. i've got no clue how include project.
what tried 1.i copied dylib , header folder project. 2. gave library search path $(project_dir) 3. gave header search path $(project_dir)/include. builds , links fine. when run it, gives me error
.yld: library not loaded: /usr/local/lib/test_dynamic_lib.dylib
now read in documentation have install library in path. how that? or can manipulate runpaths. didnt clue says. i'm beginner in cocoa development.
can explain how that? or point tutorial. couldn't find any.
i found answer. wrote build script on target.
export dylib=mylibrary.dylib mkdir "$target_build_dir/$target_name.bundle/contents/frameworks" cp -f "$srcroot/$dylib "$target_build_dir/$target_name.bundle/contents/frameworks" install_name_tool -change @executable_path/$dylib @loader_path/../frameworks/$dylib"$target_build_dir/$target_name.bundle/contents/macos/$product_nam
and yes thnx paramagnetic croissant poiting me in right direction.
objective-c osx cocoa dylib dynamic-library
Comments
Post a Comment