[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: segfault with dynamic lib and lua, depending of function name in the lib !
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 22 Dec 2010 12:24:57 -0200
> gcc gl_debug.c -fPIC -shared -ggdb -o gl_debug.so -lglut -lGLU -llua -Wall -W
Do *not* link your shared lib with the Lua library: you'll end up with
two copies and bad things will happen. I cannot tell whether this is the
main glitch, though. Your Lua program is too complicated: you should not
be using package.loadlib directly unless you have good reason, which does
not seem to be the case. Just write a proper Lua library and require it.