I am building an XS extension with Perl. I have two files:
- A C header file (
.h
) - A C source file (
.c
)
Currently what i did is to put all the C file code before the Model=
on the XS file and wrap the functions I want after the Model=
.
The compliation works with no problem and i am able to call the specific functions from perl.
But I want to separate the .xs
file from the C file.
I want the .xs
file to contain only the wrap functions, and those functions will call the functions on the .c
file, but when I do that and run the dmake
command i get error code 129 undefined reference to 'parse.c' file.
I tried to include the .c file using C and OBJECT properties for WriteMakerFile and still get an error any idea how to split the xs file to 2 one c file and the other xs which wrap the c function which are part of the .c file using ExtUtils::MakeMaker.
Examples would be appreciated.