按照http://www.cocoachina.com/bbs/simple/?t196416.html 这个教程自己动手写了个Hero类想绑定到lua使用,在终端输入 python Hero.py 时报错如下,希望遇到过类似问题的朋友指点迷津
localhost:tolua zgl$ python Hero.py
PYTHON_BIN not defined, use current python.
generating userconf.ini...
Generating bindings for Hero...
Using userconfig
('androidndkdir', '/Users/zgl/Documents/StudyFiles/Cocos2dx_Android_Tools/android/android-ndk-r9b'), ('clangllvmdir', '/Users/zgl/Documents/StudyFiles/Cocos2dx_Android_Tools/android/android-ndk-r9b/toolchains/llvm-3.3/prebuilt/darwin-x86_64'), ('cocosdir', '/Users/zgl/LuaTest/frameworks/cocos2d-x'), ('cxxgeneratordir', '/Users/zgl/LuaTest/frameworks/cocos2d-x/tools/bindings-generator'), ('extra_flags', '')]
Traceback (most recent call last):
File "/Users/zgl/LuaTest/frameworks/cocos2d-x/tools/bindings-generator/generator.py", line 1342, in
main()
File "/Users/zgl/LuaTest/frameworks/cocos2d-x/tools/bindings-generator/generator.py", line 1281, in main
raise Exception("Section not found in config file")
Exception: Section not found in config file
---------------------------------
Generating lua bindings fails.
---------------------------------