[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Building Secondary Modules
- From: "Antonio Scuri" <scuri@...>
- Date: Wed, 23 Jun 2010 14:20:47 -0300
> 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
> 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.
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.