在对象中使用C Dll和lib [英] using a C Dll and lib in obj c - ios

查看:126
本文介绍了在对象中使用C Dll和lib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows应用程序的C lib和dll文件。没有源代码与我。
可以在IOS应用程序中使用它。



我看到混合的响应,并且很困惑。
如果我们有源代码,我想我们需要创建dylib,然后我们可以使用相同的头文件。



请分享任何专家的想法指导我正确的方向。
欣赏您的帮助。




  • mia


解决方案

iOS开始不允许使用动态库,但是以上所述,DLL文件格式根本不被达尔文或底层的XNU内核识别为二进制格式是不同的。



Windows API在Darwin操作系统上无法使用(Mac OS X和iOS都是基本的达尔文操作系统周边的包装器)。您将需要从DLL重写代码以使用POSIX和/或Objective-C API,并将其编译为静态库以使用它。


I have a C lib and dll file from windows application. No source code with me. Is it possible to use that in an IOS application.

I have seen mixed responses and am confused. If we have source code , i think we need to create dylib and then we can use the same after including relevant header file.

Please share any expert ideas to guide me in right direction. Appreciate your help .

  • mia

解决方案

Dynamic Libraries are not permitted on iOS to begin with, but above that, the DLL file format is not recognized by Darwin or the underlying XNU Kernel at all, as the binary format is different.

Windows APIs are not usable on the Darwin OS either (Both Mac OS X and iOS are wrappers around the basic Darwin OS). You will need to rewrite the code from the DLL to use the POSIX and/or Objective-C APIs and compile it as a static library to use it.

这篇关于在对象中使用C Dll和lib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆