PH has asked for the wisdom of the Perl Monks concerning the following question:

Hello all, I am writing a perl harness for testing C code. Here's my problem:-
One of the C functions calls another C function which returns a ULONG value. The ULONG returning function is declared as static in a .C file and takes a structure as a parameter (The structure is typedef'd in a C file aswell).
Here's what I've got so far:
testmain.XS File: This is the declaration for the ULONG returning function which is called from another C function:-
unsigned long GetHandle(row,entry) unsigned long row CACHE *entry OUTPUT: RETVAL
Typemap:
const char * T_PV unsigned char * T_PV CACHE * T_PTROBJ
When I compile this I get the following error (First of many!)
Testmain.c Error C2065: 'CACHE': Undeclared identifier.
I have included all headers and added all .obj files to the makefile.pl.
Is there any way around these problems?? I can't modify the c code BTW!
Again, thanks,
Paul

Replies are listed 'Best First'.
Re: PerlXS
by DrSax (Sexton) on Jun 01, 2001 at 18:16 UTC
    One of my workmates does a lot of Perlxs, and when I showed him your question, he indicated he would need to see your code to determine what is going on. If you don't get any other responses, /msg me for my email address.

    Brian - a.k.a. DrSax