当编译AFNetworking 2.0时出现了Undefined symbols for architecture i386
来源:互联网 发布:城满财富 是回答知乎 编辑:程序博客网 时间:2024/06/07 03:01
转:http://www.cnblogs.com/xiongqiangcs/p/3449531.html
当将AFNetworking添加到工程后编译时出现
Undefined symbols for architecture i386: "_SecCertificateCopyData", referenced from: _AFCertificateTrustChainForServerTrust in AFSecurityPolicy.o "_SecCertificateCreateWithData", referenced from: _AFPublicKeyForCertificate in AFSecurityPolicy.o "_SecPolicyCreateBasicX509", referenced from: _AFPublicKeyForCertificate in AFSecurityPolicy.o _AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.o "_SecTrustCopyPublicKey", referenced from: _AFPublicKeyForCertificate in AFSecurityPolicy.o _AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.o "_SecTrustCreateWithCertificates", referenced from: _AFPublicKeyForCertificate in AFSecurityPolicy.o _AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.o "_SecTrustEvaluate", referenced from: _AFPublicKeyForCertificate in AFSecurityPolicy.o _AFServerTrustIsValid in AFSecurityPolicy.o _AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.o "_SecTrustGetCertificateAtIndex", referenced from: _AFCertificateTrustChainForServerTrust in AFSecurityPolicy.o _AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.o "_SecTrustGetCertificateCount", referenced from: _AFCertificateTrustChainForServerTrust in AFSecurityPolicy.o _AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.old: symbol(s) not found for architecture i386clang: error: linker command failed with exit code 1 (use -v to see invocation)
此时需要导入3个frameworks
CFNetwork.frameworkSecurity.frameworkSystemConfiguration.framework
我在将AFNetworking 2.0添加到cocos2d的工程项目时,首席必须将与AFNetworking 2.0有关的文件都变成ARC,具体步骤
Edit-》Refactor-》Convert to Objective-c ARC...,然后将与AFNetworking 2.0有关的文件选上,继续就行
编译时还可能出现“The current deployment target does not support automated __weak references”,此时需要将__weak变成__unsafe_unretained
还可能在
@property (nonatomic, strong) dispatch_queue_t completionQueue;
出现Property with 'retain(or strong)' attribute must be of object type错误,此时将上面变成
@property (nonatomic, assign) dispatch_queue_t completionQueue;
就可以编译通过
如果感觉麻烦可以试着先创建Application的工程,然后将AFNetwork 2.0添加进去,此时编译不会报错,然后再将cocos2d添加进去
按照cocos2d中的AppDelegate修改一下AppDelegate的内容即可,此方法有待尝试
0 0
- 当编译AFNetworking 2.0时出现了Undefined symbols for architecture i386
- Cocos2dx在helloCpp加入Cocosdenshion时出现了 Undefined symbols for architecture i386
- Undefined symbols for architecture i386
- Undefined symbols for architecture i386:
- Undefined symbols for architecture i386
- Undefined symbols for architecture i386 ...
- Undefined symbols for architecture i386
- Undefined symbols for architecture i386:
- Undefined symbols for architecture i386:
- Undefined symbols for architecture i386
- Undefined symbols for architecture i386
- Undefined symbols for architecture i386;
- Undefined symbols for architecture i386
- Undefined symbols for architecture i386
- Undefined symbols for architecture i386
- Undefined symbols for architecture i386:
- Undefined symbols for architecture i386
- Undefined symbols for architecture i386
- linux spi子系统驱动分析
- setup factroy常用命令
- Spring AOP
- safari快捷键
- php操作符
- 当编译AFNetworking 2.0时出现了Undefined symbols for architecture i386
- X86机器指令
- LINUX export命令
- SSH的相关博客
- FFMpeg转MP4只有声音没有图像 边下载边播放问题解决方案
- OpenLayers项目分析
- 第一次实验 八皇后及N皇后问题
- 循环获取datagrid多选项的指定列的值
- PHP 文档学习 - 8 - 遍历接口