zl程序教程

您现在的位置是:首页 >  其它

当前栏目

Lua 5.1.2 + luabind 0.7 编译 luabind 0.7 时问题的解决

解决 编译 lua 5.1 问题
2023-09-27 14:27:56 时间

会出现类似错误:
c:\temp\luabind\src\ref.cpp(95) : error C2062: type void unexpected
c:\temp\luabind\src\ref.cpp(96) : error C2143: syntax error : missing ; before {
c:\temp\luabind\src\ref.cpp(96) : error C2447: { : missing function header (old-style formal list?)
c:\temp\luabind\src\ref.cpp(113) : error C2062: type int unexpected
c:\temp\luabind\src\ref.cpp(114) : error C2143: syntax error : missing ; before {
c:\temp\luabind\src\ref.cpp(114) : error C2447: { : missing function header (old-style formal list?)
c:\temp\luabind\src\ref.cpp(153) : error C2589: ( : illegal token on right side of ::
c:\temp\luabind\src\ref.cpp(153) : error C2059: syntax error : ::
c:\temp\luabind\src\ref.cpp(157) : error C2589: ( : illegal token on right side of ::

需要打开luaconf.h,找到322行:
None.gif#undef LUA_COMPAT_GETN 替换成:
None.gif#define LUA_COMPAT_GETN 即可解决。

另外需要注意的是,编译时字符集选择不要选择Unicode,选择多字符集貌似是不错的。
Visual Studio 2015编译Lua 5.3.4遇到的坑 被坑的不浅,遇到错误:“ LNK1561:必须定义入口点”,解决方案删除再建,步骤一遍一遍操作,还是报错。如下图所示:   首先,它必须要改成DLL或者LIB(动态/静态库),如果是应用程序那必须要提供main函数的主入口。
Lua学习---编译生成lua和luac 众所周知,Lua是一种强大的脚本语言,并且这种语言是用C语言实现的。为什么要学习这门语言?因为它可以增强我看C语言代码的功底。 我下的Lua版本是Lua5.3,关于Lua5.3的简介如下: http://www.
早前就用过LUA ,只是局部的小项目使用,突然兴起想要写一些关于LUA 的  文章,记录曾经学习过的点点滴滴。 这里我使用的是LUA5.2作为 案例 lua做为轻量级脚本语言已经被广泛应用到应用软件以及游戏开发中,相比Perl以及python  lua的内核 只有100KB左右 可以很...
Sublime Text(2/3)编译lua 想在subLime text 3中集成编译Lua(或其他语言)功能,只需要在Tool- Build System - New Build System中将原来的 { shell_cmd : make } 替换为下面的代码:
用VC编译lua源码,生成lua语言的解释器和编译器 用VC编译lua源码,生成lua语言的解释器和编译器 1.去网址下载源码 http://www.lua.org/download.html 2.装一个VC++,我用的是VC6.0 3.接下来我们开始编译源码,我们需要编译: 一个静态库 一个动态库 一个lua语言解释器 一个lua编译器...