Error when using genbindings.py

I get this error when I run genbindings.py. Do I need to install something else?


error.PNG (29.4 KB)

I’m getting this error, too when I built the test. I have installed PyYAML and Cheetah. I seem to be getting this “‘string’ file not found”

C:\cocos2d-x-3.0\tools\bindings-generator\test>test.bat
PYTHON_ROOT is defined.
NDK_ROOT is defined.
ECHO is off.
generating userconf.ini...
---
---
"Generating bindings for simpletest with Android headers..."
Using userconfig
  [('androidndkdir', 'C:\\Android\\ndk\\android-ndk-r9d'), ('clangllvmdir', 'C:\
\Android\\ndk\\android-ndk-r9d/toolchains/llvm-3.3/prebuilt/windows-x86_64'), ('
cxxgeneratordir', 'C:/cocos2d-x-3.0/tools/bindings-generator/test/..'), ('extra_flags', '-D__WCHAR_MAX__=0x7
fffffff')]

.... Generating bindings for target spidermonkey

.... .... Processing section testandroid

====
Errors in parsing headers:
1. <severity = Warning,
    location = <SourceLocation file None, line 178, column 9>,
    details = "'__WCHAR_MAX__' macro redefined">
2. <severity = Fatal,
    location = <SourceLocation file 'C:/Users/Indigo/Documents/Developers/Tio/co
cos2d-x-3.0/cocos2d-x-3.0/tools/bindings-generator/test/../test/simple_test/simp
le_class.h', line 4, column 10>,
    details = "'string' file not found">
====

*** Found errors - can not continue
Traceback (most recent call last):
  File "C:/cocos2d-x-3.0/tools/bindings-generator/test/../generator.py", line 1294, in <module>
    main()
  File "C:/cocos2d-x-3.0/tools/bindings-generator/test/../generator.py", line 1290, in main
    generator.generate_code()
  File "C:/cocos2d-x-3.0/tools/bindings-generator/test/../generator.py", line 980, in generate_code
    self._parse_headers()
  File "C:/cocos2d-x-3.0/tools/bindings-generator/test/../generator.py", line 1016, in _parse_headers
    raise Exception("Fatal error in parsing headers")
Exception: Fatal error in parsing headers
---------------------------------
Generating bindings fails.

And when I looked the GitHub readme it says that I need to provide a C++ implementation of string.h. I mean, wtf? Why do I need to provide that? Why can’t the script itself be released with these files in it?

Using the PKG files before was OK. I don’t know why the team felt the need to complicate things further.