Advertisement

Help! Linux shared library error

Started by October 26, 2003 01:36 PM
1 comment, last by ParadigmShift 21 years ago
I'm trying to port my game engine from windows to linux, and I'm a bit new at linux programming so please bear with me. In windows I have all my modules in DLLs which I load at runtime via LUA functions. I'm trying to do the same with linux. So I have: "core" loads libgfx.so via dlload "libgfx.so" - compiled with -fPIC - linked with -llua -llualib - In C++, with lua headers as follows:
extern "C" {
#include "lua.h"
#include "lualib.h"
}  
Problem is, at runtime when I call dlload I get the following error:
./core: relocation error: /usr/local/lib/libgfx.so: undefined symbol: lua_pushstring 
Any idea why this would happen? Is there another forum where I would get a better answer to this question? [edited by - ParadigmShift on October 26, 2003 2:37:12 PM]
"E-mail is for geeks and pedophiles." -Cruel Intentions
try dlopen()ing the lua library as well, with the flags RTLD_GLOBAL and RTLD_NOW.

then open your library
Advertisement
Sweet, that did it! Thanks!
"E-mail is for geeks and pedophiles." -Cruel Intentions

This topic is closed to new replies.

Advertisement