我尝试为iOS构建C库,如下图所示.
我已经构建了liblib.a,但在使用liblib.a后它编译错误
当我使用liblib.a时,错误日志如下所示
file was built for archive which is not the architecture being linked (armv7): /Users/apk/Desktop/libTest/liblib.a Undefined symbols for architecture armv7:
似乎liblib.a不支持armv7,但我没有在Build Setting中找到armv7和arm64 – >架构.
如何为armv7构建C代码库并在Objective-C中使用?
– – – – – – – – – – -编辑 – – – – – – – – – – –
我改变设置后,如下图所示.
file was built for archive which is not the architecture being linked (armv7): /Users/apk/Desktop/libTest/liblib.a Undefined symbols for architecture armv7:
我错过了什么吗?
——————— EDIT2 ———————
我通过以下步骤构建.a.
1.创建新项目.
2.设置
3.
4.
>按下构建按钮
提前致谢.