Here's how I'm compiling it:
Code: Select all
gcc -o luac invoke.cpp -llua51 -llua5.1 -I "C:\Program Files (x86)\Lua\5.1\include" -L "C:\Program Files (x86)\Lua\5.1\lib"
What do I have to do to get it to compile?C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0xf): undefined r
eference to `luaL_newstate()'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0x1f): undefined
reference to `luaL_openlibs(lua_State*)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0x33): undefined
reference to `luaL_loadfile(lua_State*, char const*)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0x5b): undefined
reference to `lua_pcall(lua_State*, int, int, int)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0x85): undefined
reference to `lua_tolstring(lua_State*, int, unsigned int*)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0xbb): undefined
reference to `lua_getfield(lua_State*, int, char const*)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0xcf): undefined
reference to `lua_type(lua_State*, int)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0xed): undefined
reference to `lua_settop(lua_State*, int)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0x115): undefined
reference to `lua_pushnumber(lua_State*, double)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0x133): undefined
reference to `lua_pushnumber(lua_State*, double)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0x157): undefined
reference to `lua_pcall(lua_State*, int, int, int)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0x17c): undefined
reference to `lua_tolstring(lua_State*, int, unsigned int*)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0x1aa): undefined
reference to `lua_isnumber(lua_State*, int)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0x1da): undefined
reference to `lua_tonumber(lua_State*, int)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0x20e): undefined
reference to `lua_settop(lua_State*, int)'
C:\Users\Admin\AppData\Local\Temp\ccmDm0z8.o:invoke.cpp:(.text+0x21a): undefined
reference to `lua_close(lua_State*)'
collect2: ld returned 1 exit status