----- Original Message ----- From: "Sean McMahon" <[EMAIL PROTECTED]>
To: <inline@perl.org>
Sent: Thursday, May 24, 2007 8:55 AM
Subject: Can Inline link to static libraries


One of the reasons I started using Inline was because the xs code someone
gave me couldn't link to static libraries.  Can Inline::C get around this.
Can Inline::Java get around this if I need to use Java?

Can't speak for Inline::Java, but I've never had any trouble with Inline::C
linking to static libraries (you'll find an example or two in 'perldoc
Inline::C-Cookbook). But then, nor have I ever had any trouble with XS code
linking to static libraries. (It's usually just a matter of setting the
MakeMaker configuration appropriately.)

If the xs code really did need to link to a dynamic/shared lib, then it's
unlikely that Inline::C would change that. (Inline::C is, after all, just an
automated procedure that generates the XS file, builds the XS extension, and
then runs the script. It's essentially no different to XS.)

If you set the config option 'CLEAN_AFTER_BUILD => 0' you can go into the
_Inline/build folder and find the files (Makefile.PL, XS file, etc.) that
were generated in the building of the extension. (Without that config option
those files get cleaned up once the build process has completed
successfully.)

Cheers,
Rob

Reply via email to