问题描述:
使用cocoapod加入第三方库,打开项目有时会出现编译错误,错误如下:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_AFHTTPRequestOperationManager", referenced from:
objc-class-ref in AFNetworkingUtil.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解决步骤
1. 检查 Build Setting -> Architectures 配置是否正确
2. 在 target -> Build Settings -> Other Linker Flags 添加字段
$(inherited)