From jvbDS at helios.hampshire.edu Thu Mar 28 11:36:55 2002 From: jvbDS at helios.hampshire.edu (Jeffrey Butera) Date: Thu Aug 5 00:18:39 2004 Subject: Perl && C/C++ Message-ID: <0203281236550B.05861@staticb114.hampshire.edu> Can anyone shed any light on calling C/C++ functions from Perl? I'm sure it can be done, but I'd like to know how straightforward it is, and how you pass data types from C/C++ to perl that are "perl friendly". Thanks, -- Jeff Butera, Ph.D. Administrative Systems (Computing) Hampshire College jbutera@hampshire.edu 413-559-5556 "Let's make that zippy and quick." Bob Crowley "...to promote the advancement and diffusion of knowledge..." Andrew Carnegie Foundation From rich at on-the-net.com Thu Mar 28 11:45:24 2002 From: rich at on-the-net.com (Rich Roth) Date: Thu Aug 5 00:18:39 2004 Subject: Perl && C/C++ In-Reply-To: <0203281236550B.05861@staticb114.hampshire.edu> Message-ID: Do a man on any of these, esp, perlxs: perlembed Perl ways to embed perl in your C or C++ application perlapio Perl internal IO abstraction interface perlxs Perl XS application programming interface perlxstut Perl XS tutorial perlguts Perl internal functions for those doing extensions perlcall Perl calling conventions from C On Thu, 28 Mar 2002, Jeffrey Butera wrote: > Can anyone shed any light on calling C/C++ functions from Perl? > I'm sure it can be done, but I'd like to know how straightforward > it is, and how you pass data types from C/C++ to perl that are > "perl friendly". > > Thanks, > -- Rich Roth --- On-the-Net Direct: PO Box 550, Greenfield, MA 01302 Voice: 413-773-5270 cel: 413-210-5270 Email: rich@on-the-net.com Url: http://east.on-the-net.com Tools: Global database for Apache: http://www.apache-tools.org for your web site: http://www.i-depth.com From jproctor at marlboro.edu Thu Mar 28 11:51:38 2002 From: jproctor at marlboro.edu (J Proctor) Date: Thu Aug 5 00:18:39 2004 Subject: Perl && C/C++ In-Reply-To: <0203281236550B.05861@staticb114.hampshire.edu> Message-ID: > Can anyone shed any light on calling C/C++ functions from Perl? > I'm sure it can be done, but I'd like to know how straightforward > it is, and how you pass data types from C/C++ to perl that are > "perl friendly". Disclaimer: Never played with this much myself (although I have a project in mind when I do...), so I'm definitely not an authority on this. In addition to all the good stuff Rich just pointed out (especially perlxs and perlxstut), also look at the "Inline" family of modules, which let you include the C (or C++ or whatever else) in your perl source file. j