----- Original Message ----- From: "Sean McMahon" <[EMAIL PROTECTED]>
To: <inline@perl.org>
Sent: Wednesday, April 04, 2007 9:57 AM
Subject: Can I use inline::c to call a c library within a perl function.


I've been advised to use a particular C function from within my code and want to know if using inline::c will allow me to call this function directly. I'd like to use inline call the c function and then move on with the perl part of the program. Is this possible? All the examples had C code but didn't directly call a C function.

No problem (if I understand you correctly).

You just need to #include the relevant header(s), and provide Inline with the name and location of the library.

For an example of what's required see the "Exposing Shared Libraries" section in the cookbook ('perldoc Inline::C-Cookbook'). There's another example in the "Just Desserts" section - though the actual code in that section is specific to Windows.

Cheers,
Rob

Reply via email to