Xcode: how to link dylib library files
来源:互联网 发布:linux查看字符集编码 编辑:程序博客网 时间:2024/06/08 00:32
When linking with external dylib for an Xcode project. You might get this error:
dyld: Library not loaded: libXXX.dylib
Referenced from: .../Developer/Xcode/DerivedData/quack-gpfxwhnflltwzkdnerqlydkddvbj/Build/Products/Debug/zzz
Reason: image not found
Xcode 4.0 solution
1) click on the project in the side pane to bring up the properties.
2) click on "Target"
Checking the library:
3) In "Build Settings"
4) Using search, enter "library". There should be a path automatically set in the field for "Library Search Paths" if you added the dylib to your project.
Add a copy files phase:
3) In "Build Phases"
4) Click "Add Build Phases"
5) Click "Add Copy Files"
6) In "Destination" select "Executables"
7) Add entry by clicking the "+"
8) Choose the .dylib file from your project or manually locate it.
这种做法实际上是将dylib放在生成的app文件目录下(程序首次运行时,会将工程中的dylib文件copy到app目录)。经过测试,完全没有必要将dylib文件导入工程,直接拖到最终app目录下就可。
- Xcode: how to link dylib library files
- How to add multiple static library files with different architectures to Xcode
- How To:建立Win32 Dynamic-Link Library 【转】
- how to compile and link static/dynamic library in linux
- How to create a custom directory for app files inside the ~/Library/Application Support directory.
- xcode : could not load inserted library: /usr/lib/libgmalloc.dylib
- xcode : could not load inserted library: /usr/lib/libgmalloc.dylib
- How to link with the correct C Run-Time (CRT) library
- How to link with the correct C Run-Time (CRT) library
- How to create EPS files...
- How to Organize Your Files
- How to Uninstall Xcode
- How to Uninstall Xcode
- How to make Universal Static library (.a file) in iOs using xCode
- how to use automake to build files
- How to compile openssl library
- how to use shark library!
- How to use dylib in Mac OS X
- phys_to_virt(),ioreamp(),IO_ADDRESS() 的区别
- win mobile 5播放mp3音乐的方法(4)--5mbox封装类的代码
- 关于yield关键字的一些理解
- 如何分析thread dump
- Linux C 线程(一)
- Xcode: how to link dylib library files
- java网络编程
- iOS多线程编程指南(一)关于多线程编程
- mysql服务操作
- Struts2+Spring+iBatis整合用户管理实例之二:登录和登出
- MYSQL问题梳理(备忘)
- 多线程的互斥与同步
- linux程序中如何查看一个网卡名是否存在
- Django模板系统——过滤器