calling C/C++ function from perl

from : cvv3@yahoo.com

Hi,
how do I call a compiled C/C++ function from perl ?
Let say I have a C/C++ function:

*char func(char *ptr, int len) {
    ...
return str;}

Now i wonna call it from perl

Recommended Answers

All 3 Replies

Basically, you need a specially module. http://search.cpan.org/~ingy/Inline-0.44/C/C.pod. This will let you put C++ code INLINE, that is, into the Perl file. This still doesn't let you call the C function stored in another file (from what I can tell).

Basically, you need a specially module. http://search.cpan.org/~ingy/Inline-0.44/C/C.pod. This will let you put C++ code INLINE, that is, into the Perl file. This still doesn't let you call the C function stored in another file (from what I can tell).

thanx
I'll try it out and see

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.