在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1.apt-get install liblua5.1-0-dev 2.编辑hello.c #include "lua.h" #include "lauxlib.h" int main(int argc, char **argv) { lua_State *L = luaL_newstate(); luaL_openlibs(L); luaL_dostring(L, "print('hello, '.._VERSION)"); return 0; } 3.gcc -I/usr/include/lua5.1 -o hello hello.c -llua5.1 -lm 4../hello 5.发现报错 修改hello.c #include "lua.h" #include "lauxlib.h" #include "lualib.h" int main(int argc, char **argv) { lua_State *L = luaL_newstate(); luaL_openlibs(L); luaL_dostring(L, "print('hello, '.._VERSION)"); return 0; }
|
请发表评论