iOS :undefined symbols for architecture x86_64

问题描述:为了适配iPhone 5s的64位处理器,在编译选项中加入了arm64架构。但是发现工程在真机上可以编译通过但是在模拟器上却未编过。

问题解决:经研究在编译选项中再加入x86_64架构,重新编译工程就可以在模拟器上编译成功了.

可以这样理解armv7 , armv7s对应真机的32位处理器,i386对应模拟器的32位模拟器;arm64对应真机的64位模拟器,x86_64对应模拟器的64位模拟器。
没有相关的框架引入工程

[html] view plaincopy
Undefined symbols for architecture i386:   
"_SCError", referenced from:   
-[Reachability startNotifier] in Reachability.o   
"_SCErrorString", referenced from:   
-[Reachability startNotifier] in Reachability.o   
"_SCNetworkReachabilityCreateWithAddress", referenced from:   
+[Reachability reachabilityWithAddress:] in Reachability.o   
"_SCNetworkReachabilityCreateWithName", referenced from:   
+[Reachability reachabilityWithHostname:] in Reachability.o   
"_SCNetworkReachabilityGetFlags", referenced from:   
-[Reachability isReachable] in Reachability.o   
-[Reachability isReachableViaWWAN] in Reachability.o   
-[Reachability isReachableViaWiFi] in Reachability.o   
-[Reachability connectionRequired] in Reachability.o   
-[Reachability isConnectionOnDemand] in Reachability.o   
-[Reachability isInterventionRequired] in Reachability.o   
-[Reachability reachabilityFlags] in Reachability.o   
...   
"_SCNetworkReachabilitySetCallback", referenced from:   
-[Reachability startNotifier] in Reachability.o   
-[Reachability stopNotifier] in Reachability.o   
"_SCNetworkReachabilitySetDispatchQueue", referenced from:   
-[Reachability startNotifier] in Reachability.o   
-[Reachability stopNotifier] in Reachability.o   
ld: symbol(s) not found for architecture i386   
clang: error: linker command failed with exit code 1 (use -v to see invocation)  

参考这个:http://stackoverflow.com/questions/11013997/strange-errors-in-apples-reachability-files
得加入:SystemConfiguration.framework

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值