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

xcode 9编译失败 #305

Closed
songqi5302855 opened this issue Sep 27, 2017 · 5 comments
Closed

xcode 9编译失败 #305

songqi5302855 opened this issue Sep 27, 2017 · 5 comments

Comments

@songqi5302855
Copy link

编译脚本执行时失败,模拟器版本编译有问题
XXX.../getgateway.c:75:10: fatal error: 'net/route.h' file
not found
#include ROUTE_HEADER_FILE
^
XXX../getgateway.c:30:31: note: expanded from macro
'ROUTE_HEADER_FILE'
#define ROUTE_HEADER_FILE <net/route.h>
^~~~~~~~~~~~~
1 error generated.

@garryyan
Copy link
Collaborator

这个问题是因为xcode9 改变了一个头文件的位置,已提交fix.

tomlee0201 added a commit to tomlee0201/mars that referenced this issue Oct 6, 2017
* master: (113 commits)
  fixed Tencent#305 xcode9 build fail
  fixed windows compile
  update README.md
  rename mars/lint/Clang-Format Style Options - Clang 3.7 documentation.mhtml
  update android sample version
  update android sample version
  make shortlink release async
  fix missing previous so when build mulit-archs
  longlink connect at once when redotask
  delete windows x64 config
  "ANR_CHECK_DISABLE" move from .cc to header
  add messagequeue log info
  windows compile
  add windows in README.md
  fixed mac compile
  Windows compile
  uncomment temporarily optimization weak network when networkchange
  build_for_win32.py
  if onnetworkchange is already on mq, no need to change to mq again
  sample use marsopen.cn
  ...

# Conflicts:
#	.gitignore
#	mars/libraries/build_android.py
#	mars/libraries/mars_android_sdk/jni/longlink_packer.cc.rewriteme
#	mars/stn/jni/sources.mk
#	mars/stn/stn.xcodeproj/project.pbxproj
#	mars/stn/stn_logic.cc
@wosshzhb
Copy link
Contributor

@garryyan 你上面的修改感觉不太好,因为对于mac平台来说,<net/route.h>还是有的,那么就应该用回系统的比较好,只是iOS平台没有了,需要对应于项目自己内部的文件,其实将宏TARGET_OS_SIMULATOR 改为 TARGET_OS_IOS就OK了。
如下:

default

@garryyan
Copy link
Collaborator

@wosshzhb 多谢提醒,我确认下,后续会修改

@garryyan
Copy link
Collaborator

@wosshzhb ab582b3 已经修改,后续这类 欢迎提pr

@wosshzhb
Copy link
Contributor

ok

garryyan added a commit that referenced this issue Dec 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants