我在Swift框架中使用CommonCrypto --它已经运行了一年多了。
我使用了这里找到的解决方案:Importing CommonCrypto in a Swift framework
具体来说,要从Swift框架中引用CommonCrypto,我必须:
在我的框架Xcode项目旁边的名为CommonCrypto的文件夹中创建一个CommonCrypto文件。module.map内容:
module CommonCrypto [system]
{
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/CommonCrypto/CommonCrypto.h"
link "CommonCrypto"
export *
}CommonCrypto$(SDKROOT)/usr/lib/systemimport CommonCrypto这很好,有点令人费解--但起作用了。
但是,在Xcode 7.3 beta 1 (7D111g)中,这种技术不再有效。
看来libcommonCrypto.tbd已经从Xcode-beta.app中的:$(SDKROOT)/usr/lib/system中删除了。而且我在iPhoneOS SDK文件夹结构下也找不到它。
所以我得到了这些错误:
ld:警告:目录找不到选项'-L/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/system‘ld:库未找到-lCommonCrypto for architecture arm64 clang: arm64: linker命令在退出代码1中失败(使用-v查看调用)
如果疯狂的模块地图业务被更简单的东西所取代,那就太好了。比如,仅仅使用import CommonCrypto
无论如何,我不知道如何解决这个问题,所以任何帮助都是值得感谢的。
如果解决方案与上一个问题中的解决方案有很大不同,我在这里作为一个新问题提出,尽管我理解这可能不合适。
发布于 2016-01-23 00:10:09
看起来解决方案是删除行:
link "CommonCrypto"来自module.map文件。
https://stackoverflow.com/questions/34772239
复制相似问题