IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    tolua++没法用

    金庆发表于 2016-04-23 00:48:00
    love 0
    tolua++没法用

    (金庆的专栏)

    觉得从C++头文件生成lua绑定代码的方法比较简单,想试试tolua++.

    从Github获取toluapp:
    https://github.com/LuaDist/toluapp.git

    下载 lua-5.3.2.

    Windows下 scons all 不能用:

    gcc -o src\bin\tolua.o -c /nologo -Iinclude src\bin\tolua.c
    'gcc' 不是内部或外部命令,也不是可运行的程序或批处理文件。
    scons: *** [src\bin\tolua.o] Error 1
    scons: building terminated because of errors.

    win32下有个vc7的工程,发现只有 tolua++.exe 项目,没有 lib 项目,应该没用。

    用CMake生成VS2015的sln, 编译出现错误:
    toluapp\src\lib\tolua_map.c(414): error C2065: “LUA_GLOBALSINDEX”: 未声明的标识符

    LUA_GLOBALSINDEX应该是旧版本Lua的标识符,现已删除。

    tolua++ porting to 5.2
    http://lua-users.org/lists/lua-l/2013-01/msg00352.html
    提供了一个补丁。

    正奇怪为什么该补丁没有应用到Github代码库中,看下面有一个回复:
    http://lua-users.org/lists/lua-l/2013-01/msg00362.html

    ...the core architecture is profoundly broken, ...
    I would recommend using a different project rather than trying to maintain it...


    金庆 2016-04-23 08:48 发表评论


沪ICP备19023445号-2号
友情链接