java 如何使用dylib,如何在应用程序中使用dylib文件?
I have created lib.dylib dynamic library. I want to use that library in my application.
What are the Build setting and build phase settings are required?
Steps to use the library in objective-c.
解決方案
so there are 2 ways...
1) if the Dyld is available at link time, then you just link against it. (in Xcode you add it to the link build phase of the target you are building.)
if using a framework: The headers will end up in the header search path so you can #import them.
2) if it isn't then you will need to open the dynamic library with dlopen, then you read in each function directly... this is much more of a specialty task, like dealing with a plug-in architecture.
there are some tricky thinks if you are supplying the dynamic lib then there are issues with the library install path being relative to the executable... but you will just have to tackle them if you hit them (start by googling @rpath)
總結(jié)
以上是生活随笔為你收集整理的java 如何使用dylib,如何在应用程序中使用dylib文件?的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux红黑树节点没有数据,真正理解红
- 下一篇: linux jlink软件安装,LINU