About generating c++ class to lua problem by using bindings-generator in OSX 10.11


#1

Lately, I have upgrade my MacOSX to version 10.11, also I have upgrade Xcode to version 7.0.1.
And today I am trying to generate C++ class by using tools from path cocos2d-x/cocos/tools/tolua, It failed and reports: LibclangError: dlopen(libclang.dylib, 6),

It’s odd and I’ve done this before.
I’m trying to install clang by brew install llvm --with-clang, still no luck.

Any ideas?


#2

Post an update:

I have clone the latest version of cocos2d-x and switched to branch v3. Generate a new cocos project by command line ‘cocos new -l lua sample2’ and trying to run genbindings.py. It still says cannot load libclang.dylib file. Then I do some research and changed clang/cindex.py (line around 3400) force the libclang.dylib to absolute path to my local path. And now it seems can find and load libclang.dylib but I get another problems, so I post all output to here, hope someone can help.

==== output begins ==================================================

PYTHON_BIN not defined, use current python.
generating userconf.ini...
Generating bindings for cocos2dx...
Using userconfig
  [('androidndkdir', '/Users/matthew/Library/Android/ndk'), ('clangllvmdir', '/Users/matthew/Library/Android/ndk/toolchains/llvm-3.3/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/matthew/Projects/sample2/frameworks/cocos2d-x'), ('cxxgeneratordir', '/Users/matthew/Projects/sample2/frameworks/cocos2d-x/tools/bindings-generator'), ('extra_flags', ''), ('clang_version', '3.3')]

.... Generating bindings for target lua

.... .... Processing section cocos2d-x

dyld: warning, LC_RPATH @executable_path/../lib in /usr/local/Cellar/llvm/3.6.2/lib/libclang.dylib being ignored in restricted program because of @executable_path
====
Errors in parsing headers:
1. <severity = Warning,
    location = <SourceLocation file '/Users/matthew/Library/Android/ndk/toolchains/llvm-3.3/prebuilt/darwin-x86_64/lib/clang/3.3/include/float.h', line 86, column 9>,
    details = "'FLT_DIG' macro redefined">
2. <severity = Warning,
    location = <SourceLocation file '/Users/matthew/Library/Android/ndk/toolchains/llvm-3.3/prebuilt/darwin-x86_64/lib/clang/3.3/include/float.h', line 87, column 9>,
    details = "'DBL_DIG' macro redefined">
3. <severity = Warning,
    location = <SourceLocation file '/Users/matthew/Library/Android/ndk/toolchains/llvm-3.3/prebuilt/darwin-x86_64/lib/clang/3.3/include/float.h', line 106, column 9>,
    details = "'FLT_MAX' macro redefined">
4. <severity = Warning,
    location = <SourceLocation file '/Users/matthew/Library/Android/ndk/toolchains/llvm-3.3/prebuilt/darwin-x86_64/lib/clang/3.3/include/float.h', line 107, column 9>,
    details = "'DBL_MAX' macro redefined">
5. <severity = Warning,
    location = <SourceLocation file '/Users/matthew/Library/Android/ndk/toolchains/llvm-3.3/prebuilt/darwin-x86_64/lib/clang/3.3/include/float.h', line 114, column 9>,
    details = "'FLT_MIN' macro redefined">
6. <severity = Warning,
    location = <SourceLocation file '/Users/matthew/Library/Android/ndk/toolchains/llvm-3.3/prebuilt/darwin-x86_64/lib/clang/3.3/include/float.h', line 115, column 9>,
    details = "'DBL_MIN' macro redefined">
7. <severity = Warning,
    location = <SourceLocation file '/Users/matthew/Projects/sample2/frameworks/cocos2d-x/cocos/platform/android/CCFileUtils-android.h', line 62, column 10>,
    details = "'init' overrides a member function but is not marked 'override'">
8. <severity = Warning,
    location = <SourceLocation file '/Users/matthew/Projects/sample2/frameworks/cocos2d-x/cocos/platform/android/CCFileUtils-android.h', line 80, column 25>,
    details = "'getWritablePath' overrides a member function but is not marked 'override'">
9. <severity = Warning,
    location = <SourceLocation file '/Users/matthew/Projects/sample2/frameworks/cocos2d-x/cocos/platform/android/CCFileUtils-android.h', line 81, column 18>,
    details = "'isAbsolutePath' overrides a member function but is not marked 'override'">
====

Traceback (most recent call last):
  File "/Users/matthew/Projects/sample2/frameworks/cocos2d-x/tools/bindings-generator/generator.py", line 1541, in <module>
    main()
  File "/Users/matthew/Projects/sample2/frameworks/cocos2d-x/tools/bindings-generator/generator.py", line 1537, in main
    generator.generate_code()
  File "/Users/matthew/Projects/sample2/frameworks/cocos2d-x/tools/bindings-generator/generator.py", line 1204, in generate_code
    self._parse_headers()
  File "/Users/matthew/Projects/sample2/frameworks/cocos2d-x/tools/bindings-generator/generator.py", line 1242, in _parse_headers
    self._deep_iterate(tu.cursor)
  File "/Users/matthew/Projects/sample2/frameworks/cocos2d-x/tools/bindings-generator/generator.py", line 1266, in _deep_iterate
    self._deep_iterate(node, depth + 1)
  File "/Users/matthew/Projects/sample2/frameworks/cocos2d-x/tools/bindings-generator/generator.py", line 1266, in _deep_iterate
    self._deep_iterate(node, depth + 1)
  File "/Users/matthew/Projects/sample2/frameworks/cocos2d-x/tools/bindings-generator/generator.py", line 1266, in _deep_iterate
    self._deep_iterate(node, depth + 1)
  File "/Users/matthew/Projects/sample2/frameworks/cocos2d-x/tools/bindings-generator/generator.py", line 1266, in _deep_iterate
    self._deep_iterate(node, depth + 1)
  File "/Users/matthew/Projects/sample2/frameworks/cocos2d-x/tools/bindings-generator/generator.py", line 1246, in _deep_iterate
    if cursor.kind == cindex.CursorKind.CLASS_DECL:
  File "/Users/matthew/Projects/sample2/frameworks/cocos2d-x/tools/bindings-generator/clang/cindex.py", line 1252, in kind
    return CursorKind.from_id(self._kind_id)
  File "/Users/matthew/Projects/sample2/frameworks/cocos2d-x/tools/bindings-generator/clang/cindex.py", line 624, in from_id
    raise ValueError,'Unknown cursor kind'
ValueError: Unknown cursor kind
---------------------------------
Generating lua bindings fails.
---------------------------------

==== output ends =================================================

#3

I also encountered this problem, do not know if you have good solutions。


#4

I met the error too. I use cocos2dx 3.13.1, python 2.7.10 macOS 10.12, llvm-3.6


#5

Has anyone made any progress? I’ve run into lots of the same issue (but for JavaScript). Think it’s related

python ./genbin*
PYTHON_BIN not defined, use current python.
generating userconf.ini...
/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/libclang
Generating bindings for cocos2dx...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/android-ndk-r10e'), ('clangllvmdir', '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2d-x

Generating bindings for cocos2dx_extension...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/android-ndk-r10e'), ('clangllvmdir', '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_extension

Generating bindings for cocos2dx_experimental_video...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/android-ndk-r10e'), ('clangllvmdir', '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_experimental_video

Generating bindings for cocos2dx_experimental_webView...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/android-ndk-r10e'), ('clangllvmdir', '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_experimental_webView

Generating bindings for cocos2dx_studio...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/android-ndk-r10e'), ('clangllvmdir', '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_studio

Generating bindings for cocos2dx_audioengine...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/android-ndk-r10e'), ('clangllvmdir', '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_audioengine

Generating bindings for cocos2dx_3d_ext...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/android-ndk-r10e'), ('clangllvmdir', '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_3d_extension

Generating bindings for cocos2dx_spine...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/android-ndk-r10e'), ('clangllvmdir', '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_spine

Generating bindings for cocos2dx_ui...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/android-ndk-r10e'), ('clangllvmdir', '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_ui

Generating bindings for cocos2dx_physics3d...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/android-ndk-r10e'), ('clangllvmdir', '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_physics3d

====
Errors in parsing headers:
1. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 185, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpeqss'">
2. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 191, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpeqps'">
3. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 197, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpltss'">
4. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 203, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpltps'">
5. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 209, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpless'">
6. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 215, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpleps'">
7. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 222, column 42>,
    details = "use of undeclared identifier '__builtin_ia32_cmpltss'">
8. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 229, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpltps'">
9. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 236, column 42>,
    details = "use of undeclared identifier '__builtin_ia32_cmpless'">
10. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 243, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpleps'">
11. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 249, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpneqss'">
12. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 255, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpneqps'">
13. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 261, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpnltss'">
14. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 267, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpnltps'">
15. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 273, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpnless'">
16. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 279, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpnleps'">
17. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 286, column 42>,
    details = "use of undeclared identifier '__builtin_ia32_cmpnltss'">
18. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 293, column 18>,
    details = "use of undeclared identifier '__builtin_ia32_cmpnltps'">
19. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/android-ndk-r10e/toolchains/llvm-3.6/prebuilt/darwin-x86_64/lib/clang/3.6/include/xmmintrin.h', line 300, column 42>,
    details = "use of undeclared identifier '__builtin_ia32_cmpnless'">
20. <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 "/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/generator.py", line 1550, in <module>
    main()
  File "/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/generator.py", line 1546, in main
    generator.generate_code()
  File "/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/generator.py", line 1203, in generate_code
    self._parse_headers()
  File "/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/generator.py", line 1246, in _parse_headers
    raise Exception("Fatal error in parsing headers")
Exception: Fatal error in parsing headers
-------------------------------------
Generating javascript bindings fails.
-------------------------------------

#6

I get further when I use Crystax for the NDK:

PYTHON_BIN not defined, use current python.
generating userconf.ini...
/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/libclang
Generating bindings for cocos2dx...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2'), ('clangllvmdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2d-x

Generating bindings for cocos2dx_extension...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2'), ('clangllvmdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_extension

Generating bindings for cocos2dx_experimental_video...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2'), ('clangllvmdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_experimental_video

Generating bindings for cocos2dx_experimental_webView...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2'), ('clangllvmdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_experimental_webView

Generating bindings for cocos2dx_studio...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2'), ('clangllvmdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', ''), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_studio

====
Errors in parsing headers:
1. <severity = Error,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/cocos2d-x-3.14/external/spidermonkey/include/android/js/HashTable.h', line 1068, column 39>,
    details = "use of undeclared identifier 'SIZE_MAX'">
====

*** Found errors - can not continue
Traceback (most recent call last):
  File "/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/generator.py", line 1550, in <module>
    main()
  File "/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/generator.py", line 1546, in main
    generator.generate_code()
  File "/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/generator.py", line 1203, in generate_code
    self._parse_headers()
  File "/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/generator.py", line 1246, in _parse_headers
    raise Exception("Fatal error in parsing headers")
Exception: Fatal error in parsing headers
-------------------------------------
Generating javascript bindings fails.
-------------------------------------

#7

I get further with the extra flags -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS

PYTHON_BIN not defined, use current python.
generating userconf.ini...
/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/libclang
Generating bindings for cocos2dx...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2'), ('clangllvmdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', '-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -lc++ -x c++ -std=c++11'), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2d-x

Generating bindings for cocos2dx_extension...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2'), ('clangllvmdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', '-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -lc++ -x c++ -std=c++11'), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_extension

Generating bindings for cocos2dx_experimental_video...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2'), ('clangllvmdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', '-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -lc++ -x c++ -std=c++11'), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_experimental_video

Generating bindings for cocos2dx_experimental_webView...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2'), ('clangllvmdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', '-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -lc++ -x c++ -std=c++11'), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_experimental_webView

Generating bindings for cocos2dx_studio...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2'), ('clangllvmdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', '-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -lc++ -x c++ -std=c++11'), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_studio

Generating bindings for cocos2dx_audioengine...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2'), ('clangllvmdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', '-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -lc++ -x c++ -std=c++11'), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_audioengine

Generating bindings for cocos2dx_3d_ext...
Using userconfig
  [('androidndkdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2'), ('clangllvmdir', '/Users/Justin/Desktop/tools/crystax-ndk-10.3.2/toolchains/llvm-3.6/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14'), ('jsbdir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/scripting/js-bindings'), ('cxxgeneratordir', '/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator'), ('extra_flags', '-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -lc++ -x c++ -std=c++11'), ('clang_include', 'lib/clang/3.6/include')]

.... Generating bindings for target spidermonkey

.... .... Processing section cocos2dx_3d_extension

====
Errors in parsing headers:
1. <severity = Fatal,
    location = <SourceLocation file '/Users/Justin/Desktop/tools/cocos2d-x-3.14/cocos/2d/CCSprite.h', line 31, column 10>,
    details = "'string' file not found">
====

*** Found errors - can not continue
Traceback (most recent call last):
  File "/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/generator.py", line 1550, in <module>
    main()
  File "/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/generator.py", line 1546, in main
    generator.generate_code()
  File "/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/generator.py", line 1203, in generate_code
    self._parse_headers()
  File "/Users/Justin/Desktop/tools/cocos2d-x-3.14/tools/bindings-generator/generator.py", line 1246, in _parse_headers
    raise Exception("Fatal error in parsing headers")
Exception: Fatal error in parsing headers
-------------------------------------
Generating javascript bindings fails.
-------------------------------------