摘要: //average.cpp:Definestheentrypointfortheconsoleapplication.//#include"stdafx.h"#include<stdio.h>extern"C"{#include"lua.h"#include"lualib.h"#include"lauxlib.h"}/*指向Lua解释器的指针*/lua_State*L;staticintaverage(lua_State*L){/*得到参数个数*/intn=lua_gettop(L) 阅读全文
posted @ 2011-08-12 17:12 麦飞 阅读(4294) 评论(0) 推荐(1) 编辑
摘要: //luatest1.cpp:Definestheentrypointfortheconsoleapplication.//#include"stdafx.h"#include<stdio.h>extern"C"{#include"lua.h"#include"lualib.h"#include"lauxlib.h"}/*Lua解释器指针*/lua_State*L;intmain(intargc,char*argv[]){/*初始化Lua*/L=lua_open();/*载入Lua基 阅读全文
posted @ 2011-08-12 11:29 麦飞 阅读(558) 评论(0) 推荐(0) 编辑
摘要: 用debug模式编译时通过,而用release方式时接口函数无法识别test.obj : error LNK2001: unresolved external symbol _lua_closetest.obj : error LNK2001: unresolved external symbol _luaopen_basetest.obj : error LNK2001: unresolved external symbol _lua_open打开vstools->options->projects->vc++ directories (工具->选项->目录)e 阅读全文
posted @ 2011-08-12 11:17 麦飞 阅读(911) 评论(1) 推荐(0) 编辑