Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS11 上引入文件报错 #19

Open
tuluigi opened this issue Sep 13, 2017 · 3 comments
Open

iOS11 上引入文件报错 #19

tuluigi opened this issue Sep 13, 2017 · 3 comments

Comments

@tuluigi
Copy link

tuluigi commented Sep 13, 2017

#if TARGET_IPHONE_SIMULATOR #include <net/route.h> #else

iOS 11上报错,需要improt方式
#import "Route.h"

@graceydb
Copy link

楼主大大快来帮帮忙

@GBChain
Copy link

GBChain commented Sep 20, 2017

check_compile_time改为__Check_Compile_Time,因为在iOS 11里check_compile_time已经弃用了

@CrazyFanFan
Copy link

CrazyFanFan commented Sep 20, 2017

升级XCode9,在 LDNetGetAddress.m(line 21) 处有头文件的引用问题,代码如下:

#if TARGET_IPHONE_SIMULATOR
#include <net/route.h>
#else
#include "Route.h"
#endif /the very same from google-code/

解决方案如下

#if TARGET_IPHONE_SIMULATOR
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 110000 //iOS11,用数字不用宏定义的原因是低版本XCode不支持110000的宏定义
#include <net/route.h>
#else
#include "Route.h"
#endif
#else
#include "Route.h"
#endif /the very same from google-code/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants