跪求 lua-binding出错,吐血中

整了两天了,lua-binding死活不成功,就是generator.py一直报错:
环境: NDK: r9b
coco: 3.2
python: 2.7.8 x32版本, (尝试过64位版本,但直接报libclang错误)
不管是生成官方的generator.py,还是自己写class,都报错,吐血。。。。。
有成功过的给点建议呗。。。

Errors in parsing headers:

  1. <severity = Warning,
    location = <SourceLocation file None, line 191, column 9>,
    details = “‘WCHAR_MAX’ macro redefined”>
  2. <severity = Error,
    location = <SourceLocation file ‘G:\cocos2d\DoomGame\DoomGame\frameworks
    \cocos2d-x/cocos/base/CCConsole.h’, line 35, column 9>,
    details = “unknown type name ‘SSIZE_T’”>
  3. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\bits/c++0x_warning.h’, line 32, column 2>,
    details = ‘This file requires compiler and library support for the ISO C++ 2
    011 standard. This support is currently experimental, and must be enabled with t
    he -std=c++11 or -std=gnu++11 compiler options.’>
  4. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/platforms/android-14/ar
    ch-arm/usr/include\sysefs.h’, line 252, column 2>,
    details = ‘“No function renaming possible”’>
  5. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/platforms/android-14/ar
    ch-arm/usr/include\syspes.h’, line 69, column 9>,
    details = “unknown type name ‘__kernel_loff_t’”>
  6. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 66, column 11>,
    details = “no member named ‘isalnum’ in the global namespace”>
  7. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 67, column 11>,
    details = “no member named ‘isalpha’ in the global namespace”>
  8. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 68, column 11>,
    details = “no member named ‘iscntrl’ in the global namespace”>
  9. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 69, column 11>,
    details = “no member named ‘isdigit’ in the global namespace”>
  10. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 70, column 11>,
    details = “no member named ‘isgraph’ in the global namespace”>
  11. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 71, column 11>,
    details = “no member named ‘islower’ in the global namespace”>
  12. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 72, column 11>,
    details = “no member named ‘isprint’ in the global namespace”>
  13. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 73, column 11>,
    details = “no member named ‘ispunct’ in the global namespace”>
  14. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 74, column 11>,
    details = “no member named ‘isspace’ in the global namespace”>
  15. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 75, column 11>,
    details = “no member named ‘isupper’ in the global namespace”>
  16. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 76, column 11>,
    details = “no member named ‘isxdigit’ in the global namespace”>
  17. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 77, column 11>,
    details = “no member named ‘tolower’ in the global namespace”>
  18. <severity = Error,
    location = <SourceLocation file ‘c:\android-ndk-r9b/sources/cxx-stl/gnu-lib
    stdc++/4.7/include\cctype’, line 78, column 11>,
    details = “no member named ‘toupper’ in the global namespace”>
  19. <severity = Error,
    location = <SourceLocation file ‘G:\cocos2d\DoomGame\DoomGame\frameworks
    \cocos2d-x/cocos/base/CCConsole.h’, line 83, column 14>,
    details = “no type named ‘function’ in namespace ‘std’”>
  20. <severity = Error,
    location = <SourceLocation file ‘G:\cocos2d\DoomGame\DoomGame\frameworks
    \cocos2d-x/cocos/base/CCConsole.h’, line 83, column 22>,
    details = “expected member name or ‘;’ after declaration specifiers”>
  21. <severity = Fatal,
    location = <SourceLocation file None, line 0, column 0>,
    details = ‘too many errors emitted, stopping now’>
    ====

*** Found errors - can not continue
Traceback (most recent call last):
File “G:\cocos2d\DoomGame\DoomGame\frameworks\cocos2d-x\tools\bindings-generat
or/generator.py”, line 1342, in
main()
File “G:\cocos2d\DoomGame\DoomGame\frameworks\cocos2d-x\tools\bindings-generat
or/generator.py”, line 1338, in main
generator.generate_code()
File “G:\cocos2d\DoomGame\DoomGame\frameworks\cocos2d-x\tools\bindings-generat
or/generator.py”, line 1011, in generate_code
self._parse_headers()
File “G:\cocos2d\DoomGame\DoomGame\frameworks\cocos2d-x\tools\bindings-generat
or/generator.py”, line 1047, in _parse_headers
raise Exception(“Fatal error in parsing headers”)
Exception: Fatal error in parsing headers

Generating lua bindings fails.

也遇到这个问题了,求大神解答

修改cocos2dx_custom.ini中的android_headers,教程里给的那个不对,你可以从其他的ini中复制过来,另外NDK我用的r9d

我也遇到这个问题了,求大神解答

NDK: r9b 你们在哪下载的 我表示整个互联网都搜不到

32位和64位的
http://dl.google.com/android/ndk/android-ndk-r9b-windows-x86.zip
http://dl.google.com/android/ndk/android-ndk-r9b-windows-x86_64.zip

你用的是哪个互联网。。

找到了,谢谢。