lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.