24 lines
389 B
C
24 lines
389 B
C
|
#ifndef LUA_WRAPER_H
|
||
|
#define LUA_WRAPER_H
|
||
|
|
||
|
|
||
|
#include <string.h>
|
||
|
extern "C" {
|
||
|
#include "lua.h"
|
||
|
#include "lauxlib.h"
|
||
|
#include "lualib.h"
|
||
|
}
|
||
|
|
||
|
void TestLua(){
|
||
|
char buff[256];
|
||
|
int error;
|
||
|
lua_State *L = luaL_newstate(); //打开lua
|
||
|
if(nullptr != L){
|
||
|
printf("shit is nullptr");
|
||
|
}
|
||
|
luaL_openlibs(L); //打开标准库
|
||
|
|
||
|
lua_close(L);
|
||
|
}
|
||
|
#endif // LUA_WRAPER_H
|