in reply to symbol lookup error
The purpose of XS is to convert from Perl calling semantics to C ones, convert the returned value to something perlish.
I don't have much XS experience, but it seems wrong to me to call a glue function from C. You'd do better to put a and b in another file.
/* my.xs */ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "my.h" MODULE = MySOTester PACKAGE = MySOTester void a() void b()
/* my.h */ extern void a(); extern void b();
/* my.c */ #include "my.h" #include <stdio.h> void a() { printf("Hello\n"); } void b() { a(); printf("World!\n"); }
Not tested.
|
|---|