On Jun 15, 2005, at 8:53 AM, nisha singla wrote:

Thanks Scott. Actually I have been following John
Keiser's document as well. The code compiles fine and
I get the appropriate output. However it doesn't tell
me how I can load an so ( shared library ) . Any
pointers on that ?

I guess i misunderstood -- are you wanting to load libraries at runtime or at link time?

Loading at link time is just a matter of adding -lfoo to link with libfoo.so.

Loading at runtime is rather more difficult, because code that uses dynamic libraries is not terribly portable. Also, C++ name mangling conventions make it more work to find C++ symbols than C ones, and you still have the problem of marshaling parameters (which compiled XS code does for you). Since perl extensions are already shared objects, you can save some grief by having a compiled XS extension that explicitly links with your target library, and load the extension on the fly with require.

Other gurus may have better info than i.


--
elysse (pregnant): are your hands cold?
me: uh, i suppose so.
elysse: will you put them on me?

Reply via email to