lua-users home
lua-l archive

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


> What about moving the shared functions to a separate libwhatever.so and
> linking both modules to this library?

  I comment that on my reply to Jerome, but they are just a few functions.
Module1.so is already a library exporting its functions. Just because a name
I'm trapped.

 
> Or put a struct of function pointers into the Lua registry and call the
> shared functions via the function pointers...

  Too much for what I want. And this is just an example. If for every
library I had to do that I'll be dam.

  Thanks anyway.

  The interesting thing, is that in MacOSX I don't need to add module1.so to
the linker. It simply finds the functions (of course requiring module1
before module2). In Linux I can link without using module1.so, but then it
fails to require module2. Maybe there is a parameter to the linker for
dynamic library just like "-Wl,-E" exists for the executable.

Best,
Scuri