lua-users home
lua-l archive

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


Hello lua-l,

As indicated by my e-mail this morning, I'm writing a Lua-Perl bridge.
I've run into a bit of a snag.

I've written perl.c, which currently just allows you to evaluate
strings of Perl code from Lua.  However, when I load a dynamic module
from Perl (ex. Scalar::Util), I get errors relating to undefined
symbols.  This probably stems from the fact that I have a standalone
Lua interpreter loading a shared object (perl.so) that loads another
shared object (libperl.so) that uses a dynamic loader (Perl's
DynaLoader) to load another shared object (in the case of Scalar::Util,
List/Util/Util.so).  I understand the basics of linking, but this is
beyond my current knowledge.

Attached are three files:

- perl.c, which defines the Lua bindings to my Perl bridge.
- Makefile - self explanatory
- fail.lua - After running make, run 'lua fail.lua' and you'll see the
  errors.

Note: If I compile my perl.c into standalone Lua, fail.lua passes fine.

I should specify that I'm on 64-bit Fedora 12.

If anyone with a greater knowledge of linking could take a look at this
and give me any insight, I'd be very grateful.

Thanks,
Rob Hoelz

Attachment: signature.asc
Description: PGP signature