Original Post
I'm attempting to incorporate Lua into my 2D RPG engine written in C++. To begin, I wrote the following program to test out Lua: Unfortunately, even this simple program causes linker errors:
#include <iostream>
#include <lua.hpp>
int main(int argc, char* argv[])
{
lua_State* L = luaL_newstate();
luaL_openlibs(L);
lua_close(L);
return 0;
}
Quote:It looks to me that the functions I'm using explicitly are actually macros for several implied functions, the implementation of which are missing. I'm running Fedora Core 5 and using the Anjuta IDE. I know this is probably a really obscure problem for anyone besides me to solve, but I'd appreciate any advice. Thanks!
/usr/lib/gcc/i386-redhat-linux/4.1.0/../../../liblua.a(loadlib.o): In function ll_loadfunc':loadlib.c:(.text+0x8e7): undefined reference todlsym" :loadlib.c:(.text+0x8f4): undefined reference todlerror' :loadlib.c:(.text+0x9cc): undefined reference todlopen' :loadlib.c:(.text+0x9e1): undefined reference todlerror' /usr/lib/gcc/i386-redhat-linux/4.1.0/../../../liblua.a(loadlib.o): In functiongctm':loadlib.c:(.text+0xfee): undefined reference to `dlclose'