Modules, Perl 5.005_03, Cygwin Beta20.1

Mark Watson mchu7mw4@fs2.ee.umist.ac.uk
Thu Mar 2 04:09:00 GMT 2000


I am trying to connect a C library to Perl. I have this working under 
Linux. However under Cygwin (on Win98) I am having problems.

The problem is in the wrapper code (I am using SWIG). This causes 
Perl to segfault due to accessing memory address 0.

SWIG uses Dynaloader to load the module. Rather than using the 
automatic booting of modules, I tried using each seperate function. 
As described in the Camel book. 

The DLL is loaded correctly. The symbol for boot_matrix (where matrix 
is the module name)  is found and the function is called sucessfully. 
I tested this with just a printf in the boot_matrix function. 

With a little further effort I discovered that the problem is due to 
the macro dSARGS. This breaks down into further macros and eventually 
it tries to dereference some pointers. PL_stack_something I think - I 
can't remember:-( Anyway the point is that these pointers are not 
initialised to anything (i.e. they are normally 0). 

Presumably these are intialised by importing the variables into the 
DLL somehow. Has anyone got this sort of thing to work? If so  - 
please help!

Thank you,

Mark Watson


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list