Xcode 4.2 - 在此功能警告之外不会显示'...'的声明 [英] Xcode 4.2 - declaration of '...' will not be visible outside of this function warning
本文介绍了Xcode 4.2 - 在此功能警告之外不会显示'...'的声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用Apple的Apple Reachability类示例代码
可达性
I use Apple Reachability class from Apple Sample code Reachability
我在此课程中收到警告
+ (Reachability*) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress;
'struct sockaddr_in '的声明在此函数之外将不可见*
declaration of 'struct sockaddr_in' will not be visible outside of this function*
我不擅长经典C%)所以我不明白我如何解决这个警告或者可能是我可以忽略它。
I am not good at classic C %) so I dont understand how I can fix this warning or may be I can ignore it at all.
Thx
推荐答案
添加 #import在Reachability.h中< netinet / in.h>
以逃避这个
这篇关于Xcode 4.2 - 在此功能警告之外不会显示'...'的声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文