谢谢分享
如果是cocos 3.2的话 platform要改成 -I%(cocosdir)s/cocos/platform -I%(cocosdir)s/cocos/platform/android 不然会报 CCPlatformDefine.h找不到,这个卡了我很久。。。。。
把ini里面的4.7改成4.8
楼主 tolua/README.mdown里的On MAC:
- Download (http://dl.google.com/android/ndk/android-ndk-r9b-darwin-x86_64.tar.bz2) from (http://developer.android.com/tools/sdk/ndk/index.html)
- Run
export NDK_ROOT=/path/to/android-ndk-r9b
./genbindings.py
(这个要怎么添加呀 )
self)
File “E:\cocos2d-x-3.2\tools\bindings-generator\clang\cindex.py”, line 2221, i
n from_source
raise TranslationUnitLoadError(“Error parsing translation unit.”)
TranslationUnitLoadError: Error parsing translation unit.
Generating lua bindings fails.
楼主,请问这是为何?
我跟你的问题一样啊!你解决了没有啊! 
狠好狠强大
我之前跟你出现的问题一样。
出错的原因应该是ini中的头文件路径有问题。你可以直接写个绝对路径下去试试。
mark mark 不错~~~~
请问,lua function 怎么当参数 传给 C++的 std::function<void()>
缺少各种python 库
我也遇到这个问题
如果我想导出特定函数 怎么搞?? 感觉越来越复杂了
请问生产的cpp和hpp文件是要放到哪里?
自定义的类继承自node。但是在lua里,这个类找不到父类的函数。同时,addChild(自定义类)的时候,也因为这个类不是node或node的子类而报错。报错信息是addChild需要3个参数,当前1个,需要3个。即使我把zorder和name/tag填上,同样报错,需要3个,当前3个,期望3个。如果在自定义类写函数setParent_extra(parent) parent->addChild(this); 这么做就能解决问题了。
请问这里应该怎么处理。ini文件的abstract_class填上了Node,也没用。

— Begin quote from ____
引用第8楼wsltsg1988于2014-04-18 17:50发表的 :
请问下,这个函数 registerScriptEvent(const char* nCmd, int handle) handle是脚本函数,在绑定的时候怎么设置可以实现LUA_FUNCTION handler = ( toluafix_ref_function(tolua_S,3,0)) 而不是这样 ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1);
http://www.cocoachina.com/bbs/job.php?action=topost&tid=196416&pid=931045
— End quote
同问