我有一个跨平台项目,涉及在 ios 和 Android 中使用相同的 C 源代码库。
ios 版本运行良好,但是当我在 Android 中包含该库时,我遇到了一些 CoreFoundation 类型的错误,例如 CFAbsoluteTime 和 CFGregorianDate。
我试过使用 CoreFoundation Lite ,但是配置先决条件一团糟。感觉只对几种数据类型有点矫枉过正。
我走在正确的轨道上吗?是否有 CFAbsoluteTime 和 CFGregorianDate 的“快速”替代品,或者我应该尝试让库正常工作?
谢谢!
最佳答案
when I'm including the library in Android, I'm getting errors with the CFAbsoluteTime and CFGregorianDate types
看来 CFGregorianDate
和 CFAbsoluteTime
是来自 Apple SDK(“核心基础”)的类。
should I rewrite the C to remove the offending data types?
Android NDK 不包含核心基础 API。因此,要么删除对这些 API 的引用,要么找到它们的一些跨平台端口。
关于android - 包括Android中的C : CFAbsoluteTime, CFGregorianDate等,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43898384/