Projects > cpp > Issues > Bug #2665

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

Generation of scripting/lua/cocos2dx_support/LuaCocos2d.cpp is unclear

Bug #2665 [Rejected]
godyZ 2013-08-21 09:30 . Updated almost 3 years ago

(9re opened this issue 9 months ago in github)

I have read the description in

and by using tolua**~~1.0.92
I cannot make the same LuaCocos2d.cpp by
\$ ant~~buildfile build_macosx.xml
instead it generates LuaCocos2d.cpp with many diffs like
static int tolua_collect_CCAnimationFrame
CCAnimationFrame* self = tolua_tousertype;

  • Mtolua_delete;
  • return 0;
  • delete self;
  • return 0; }

@ -5609,9 +5534,7@ static int tolua_Cocos2d_CCArray_createWithObject00(lua_State* tolua_S)
CCObject* pObject = ((CCObject**) tolua_tousertype);
CCArray** tolua_ret = (CCArray**) CCArray::createWithObject;

  • int nID = ? tolua_ret~~>m_uID :~~1;
  • int** pLuaID = (tolua_ret) ? &tolua_ret~~>m_nLuaID : NULL; ~~ toluafix_pushusertype_ccobject(tolua_S, nID, pLuaID, (void*)tolua_ret,“CCArray”);
  • tolua_pushusertype(tolua_S,(void*)tolua_ret,“CCArray”); } }

I made some modification on ccLanguageType for supporting japanese(#1665) and generated LuaCocos2d.cpp but most of diffs are unintended so I have to git add —patch and select the changes that I really wanted.

I want to know the proper way to do it.


dualface commented:
For mac, please use tolua**
For windows, use tolua**.zip.
Use build.php generate valid LuaCocos2d.cpp
\$ cd tools/tolua*+
\$ php build.php
9re commented :
Isn’t there linux version or source code version for tolua*+?

dualface 2013-08-21 11:08

The ant is outdated, please use tools/tolua++/。

WenHai 2014-01-09 02:39
  • Status changed from New to Rejected

The tool for generation lua bind code is tools\tolua\ on last version.

zhangxm 2014-01-09 06:10
  • Target version deleted (Candidate)

Atom PDF

Start date:2013-08-21
Due date:
% Done:


Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.