为什么我不能编译

]# gcc testlua.C -llua -lm -ldl -I/usr/local/include/ -L/usr/local/lib/ -o testlua
/tmp/ccIkmvNG.o: In function `csum(lua_State*)':
testlua.C:(.text+0x16): undefined reference to `lua_tointeger(lua_State*, int)'
testlua.C:(.text+0x27): undefined reference to `lua_tointeger(lua_State*, int)'
testlua.C:(.text+0x3c): undefined reference to `lua_pushinteger(lua_State*, long)'
/tmp/ccIkmvNG.o: In function `main':
testlua.C:(.text+0x59): undefined reference to `luaL_newstate()'
testlua.C:(.text+0x8d): undefined reference to `luaL_loadfile(lua_State*, char const*)'
testlua.C:(.text+0xc4): undefined reference to `lua_pcall(lua_State*, int, int, int)'
testlua.C:(.text+0xf6): undefined reference to `lua_getfield(lua_State*, int, char const*)'
testlua.C:(.text+0x109): undefined reference to `lua_getfield(lua_State*, int, char const*)'
testlua.C:(.text+0x117): undefined reference to `lua_tointeger(lua_State*, int)'
testlua.C:(.text+0x128): undefined reference to `lua_tointeger(lua_State*, int)'
testlua.C:(.text+0x14b): undefined reference to `lua_settop(lua_State*, int)'
testlua.C:(.text+0x16c): undefined reference to `lua_getfield(lua_State*, int, char const*)'
testlua.C:(.text+0x17b): undefined reference to `lua_pushinteger(lua_State*, long)'
testlua.C:(.text+0x18a): undefined reference to `lua_pushinteger(lua_State*, long)'
testlua.C:(.text+0x1a2): undefined reference to `lua_pcall(lua_State*, int, int, int)'
testlua.C:(.text+0x1be): undefined reference to `lua_tolstring(lua_State*, int, unsigned long*)'
testlua.C:(.text+0x1ea): undefined reference to `lua_tointeger(lua_State*, int)'
testlua.C:(.text+0x210): undefined reference to `lua_settop(lua_State*, int)'
testlua.C:(.text+0x24b): undefined reference to `lua_getfield(lua_State*, int, char const*)'
testlua.C:(.text+0x258): undefined reference to `lua_pushstring(lua_State*, char const*)'
testlua.C:(.text+0x265): undefined reference to `lua_pushstring(lua_State*, char const*)'
testlua.C:(.text+0x27d): undefined reference to `lua_pcall(lua_State*, int, int, int)'
testlua.C:(.text+0x299): undefined reference to `lua_tolstring(lua_State*, int, unsigned long*)'
testlua.C:(.text+0x2ca): undefined reference to `lua_tolstring(lua_State*, int, unsigned long*)'
testlua.C:(.text+0x2f2): undefined reference to `lua_settop(lua_State*, int)'
testlua.C:(.text+0x305): undefined reference to `lua_pushcclosure(lua_State*, int (*)(lua_State*), int)'
testlua.C:(.text+0x318): undefined reference to `lua_setfield(lua_State*, int, char const*)'
testlua.C:(.text+0x32b): undefined reference to `lua_getfield(lua_State*, int, char const*)'
testlua.C:(.text+0x33a): undefined reference to `lua_pushinteger(lua_State*, long)'
testlua.C:(.text+0x349): undefined reference to `lua_pushinteger(lua_State*, long)'
testlua.C:(.text+0x361): undefined reference to `lua_pcall(lua_State*, int, int, int)'
testlua.C:(.text+0x37d): undefined reference to `lua_tolstring(lua_State*, int, unsigned long*)'
testlua.C:(.text+0x3a6): undefined reference to `lua_tointeger(lua_State*, int)'
testlua.C:(.text+0x3cc): undefined reference to `lua_settop(lua_State*, int)'
testlua.C:(.text+0x3d5): undefined reference to `lua_close(lua_State*)'
/tmp/ccIkmvNG.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
<2024年11月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

导航

统计

常用链接

留言簿

随笔档案

搜索

最新评论

阅读排行榜

评论排行榜