[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problem linking Lua C module with external library
- From: Daniel Bolgheroni <daniel@...>
- Date: Fri, 10 May 2013 09:22:34 -0300
On Thu, May 09, 2013 at 10:53:56PM +0200, Philipp Janda wrote:
>
> Do you need to link with liblua on your platform? On some Unices
> (e.g. Linux, BSDs) Lua exports its symbols from the executable by
> default ...
You're right.
$ uname -mrs
OpenBSD 5.3 amd64
$
> Is your luaopen_* function mangled by any chance?
> $ nm lgdal.so | grep luaopen
> or
> $ readelf -s lgdal.so | grep luaopen
$ nm lgdal.so | grep luaopen
00000ba5 T luaopen_lgdal
$
or
$ readelf -s lgdal.so | grep luaopen
31: 0000000000000ba5 42 FUNC GLOBAL DEFAULT 8 luaopen_lgdal
39: 0000000000000ba5 42 FUNC GLOBAL DEFAULT 8 luaopen_lgdal
$
Anyway, if I just don't explicitly link with libgdal or liblua, I
eliminate the problem.
Thank you.