in reply to Re^2: perlxs documentation
in thread perlxs documentation
I just tried the first example (adding the hello world function to the xs file) and it works fine for me. Here's what my Mytest.xs looks like (no changes required to any other file) update: I mean: just do what the tutorial says, and ignore small differences in the generated files compared to the docs:
and the test script:#include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" MODULE = Mytest PACKAGE = Mytest void hello() CODE: printf("Hello, world!\n");
You should probably remember that XS is whitespace sensitive, especially with regards to the function prototypes.#!/usr/local/bin/perl use ExtUtils::testlib; use Mytest; Mytest::hello(); __OUTPUT__ Hello, world!
HTH, Joost.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: perlxs documentation
by hotshot (Prior) on May 26, 2005 at 13:21 UTC |