如题,在2.2的版本中 有tools/tolua++/文件夹下有pkg安装包,然后用tolua++工具 生成 就好了,但在3.0rc0版中 没有找到对应的文件夹及文件,该如何解决呢?
You can reffer to README.mdown
in tools/tolua
folder.
====
Errors in parsing headers:
- <severity = Warning,
location = <SourceLocation file None, line 180, column 9>,
details = “‘WCHAR_MAX’ macro redefined”> - <severity = Fatal,
location = <SourceLocation file ‘C:SVN\trunk/cocos/base\CCGeometry.h’, line 30, column 10>,
details = “‘functional’ file not found”>
====
我在编译的时候遇到这个问题,怎么解决,谢谢。
具体可以看这个谢谢。
@samuele3hu
i encounter the same problem.
Errors in parser hearders:
CCGeometry.h line 30,#include
the program can’t find ‘functional’
i look at the file ‘scripting\lua-bindings\auto\lua_cocos2dx_auto.cpp’, it only has these content
#include “lua_cocos2dx_auto.hpp”
#include “cocos2d.h”
#include “SimpleAudioEngine.h”
#include “tolua_fix.h”
#include “LuaBasicConversions.h”
nothing else.
Did you run genbindings.py
in windows platform,and can you describe the steps you did?Thank you.
- i use ‘android-ndk-r9c’
- i use python2.7.5
- Download pyyaml and install
- Download pyCheetah and unzip it to “C:\Python27\Lib\site-packages”
- Set environment variables (
NDK_ROOT
) - in windows cmd console, Go to “cocos2d-x/tools/tolua” folder, and run “python genbindings.py”
then script error.
i did not change any file in cocos and did not add my file, just to test luabinding.
I have encountered a problem
README.mdown in tools/tolua folder said as follows:
- Make sure that you have installed
android-ndk-r9b
. - Download python2.7.3 (32bit) from (http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi).
- Add the installed path of python (e.g. C:\Python27) to windows environment variable named ‘PATH’.
- Download pyyaml from http://pyyaml.org/download/pyyaml/PyYAML-3.10.win32-py2.7.exe and install it.
- Download pyCheetah from https://raw.github.com/dumganhar/cocos2d-x/download/downloads/Cheetah.zip, unzip it to “C:\Python27\Lib\site-packages”
- Set environment variables (
NDK_ROOT
) - Go to “cocos2d-x/tools/tolua” folder, and run “genbindings.py”.
My colleague has checked it in window8,it is ok.
@samuele3hu I have met the same problem 2. <severity = Fatal,
location = <SourceLocation file ‘F:\cocos
.h’, line 30, column 10>,
details = “‘functional’ file not found”>
*** Found errors - can not continue
Traceback (most recent call last):
File “F:\cocos2d-x-3.0rc0\tools\bindings-generator/generator.py”, line 1262, i
n
main()
File “F:\cocos2d-x-3.0rc0\tools\bindings-generator/generator.py”, line 1258, i
n main
generator.generate_code()
File “F:\cocos2d-x-3.0rc0\tools\bindings-generator/generator.py”, line 948, in
generate_code
self._parse_headers()
File “F:\cocos2d-x-3.0rc0\tools\bindings-generator/generator.py”, line 984, in
_parse_headers
raise Exception(“Fatal error in parsing headers”)
Exception: Fatal error in parsing headers
Generating lua bindings fails.
i had the same problem.why?
Can you paste the detail informations?
i have the same problem, OS X version 10.8.5
X-MacBook-Pro:tolua Y$ python --version
Python 2.7.2
PYTHON_BIN not defined, use current python.
generating userconf.ini…
Generating bindings for cocos2dx…
Using userconfig
[(‘androidndkdir’, ‘/Users/Y/Desktop/dev/NDK/android-ndk-r9d’), (‘clangllvmdir’, ‘/Users/Y/Desktop/dev/NDK/android-ndk-r9d/toolchains/llvm-3.3/prebuilt/darwin-x86_64’), (‘cocosdir’, ‘/Users/Y/Documents/workspace/cocosproject/cocos2d-x-3.0’), (‘cxxgeneratordir’, ‘/Users/Y/Documents/workspace/cocosproject/cocos2d-x-3.0/tools/bindings-generator’), (‘extra_flags’, ‘’)]
… Generating bindings for target lua
… … Processing section cocos2d-x
====
Errors in parsing headers:
- <severity = Fatal,
location = <SourceLocation file ‘/Users/Y/Documents/workspace/cocosproject/cocos2d-x-3.0/cocos/base/CCGeometry.h’, line 30, column 10>,
details = “‘functional’ file not found”>
====
*** Found errors - can not continue
Traceback (most recent call last):
File “/Users/Y/Documents/workspace/cocosproject/cocos2d-x-3.0/tools/bindings-generator/generator.py”, line 1294, in
main()
File “/Users/Y/Documents/workspace/cocosproject/cocos2d-x-3.0/tools/bindings-generator/generator.py”, line 1290, in main
generator.generate_code()
File “/Users/Y/Documents/workspace/cocosproject/cocos2d-x-3.0/tools/bindings-generator/generator.py”, line 980, in generate_code
self._parse_headers()
File “/Users/Y/Documents/workspace/cocosproject/cocos2d-x-3.0/tools/bindings-generator/generator.py”, line 1016, in _parse_headers
raise Exception(“Fatal error in parsing headers”)
Exception: Fatal error in parsing headers
Generating lua bindings fails.
what is the problem resolve ?please helper