[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-Modules] Building XS based modules



Hello,

I have recently been looking at XS files and how to build shared=20
libraries. I followed with interest the recent discussion lead by=20
Fran=E7ois LETELLIER. And have been reading the tutorial By Arved 
Sandstrom.

I am using CW IDE and I started by trying to build the XS example in=20
the back of the MPPE book.. that is XPlusX.

I encountered similar problems to Fran=E7ois with regard to lots of 
redefinitions in the sfio header files. I then found a more recent (I=20
think!) version of sfio on Matthias Neeracher's website (*see below).=20
Using this version in place of the MacPerl source distribution of=20
sfio fixed all the redefinition errors.... however it came up with=20
some new errors of its own... specifically an illegal type, ssize_t.=20
I am pretty new to C and have only come across a size_t type so not=20
knowing if this was correct and in true newbie fashion (!!) i=20
replaced all of these in the new sfio.h file with size_t ....and it=20
compiled. I created the shared library with make, and low and behold=20
my XPlusX module now worked!! yeah... my first module build!

Anyway, the reason for my post is firstly, was I right to replace the=20
ssize_t types with size_t in the sfio.h? or will this cause me=20
problems later on. And secondly that this experience may be useful to=20
someone else who is just starting out in this.

thanks

adam



* address of the newer sfio
ftp://sunsite.cnlab-switch.ch/software/platform/macos/src/mw_c/sfio_04=20
Aug99.sit.bin


=3D=3D=3D=3D Want to unsubscribe from this list?
=3D=3D=3D=3D Send mail with body "unsubscribe" to macperl-modules-request@m=
acperl.org