Hello Perl XS readers,
I'm using Active State Perl 5.005_03 build 522 for Win32.
I would like to call some routines in a DLL. This has
been a long and rocky road, but that's not my current problem.
I have this C function:
extern signed long viOpenDefaultRM (unsigned long *vi);
I'd like to call this func from Perl. Here's what I have in the
.xs file: (plus lots of other stuff like constant handling
code that I haven't shown). [1]
signed long
viOpenDefaultRM(vi)
unsigned long *vi
When I compile this, here's what I get:
hpiw0300 [//c/My\ Documents/VISA] nmake
C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib C:\Perl\lib\ExtUtils/xsubpp
-typemap C:\Perl\lib\ExtUtils\typemap VISA.xs >xstmp.c && C:\Perl\bin\perl.exe
-IC:\Perl\lib -IC:\Perl\lib -MExtUtils::Command -e mv xstmp.c VISA.c
Error: 'signed long' not in typemap in VISA.xs, line 135
NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x1'
I've had a look at the C:\Perl\lib\ExtUtils\typemap file [2],
and it has entries for unsigned integers, but not signed integers.
Can anyone enlighten me on why there's no (apparent) typemap conversion
for signed integers please? Alternatively, what might I be doing
wrong?
Any help would be gratefully received.
Thanks,
Mitch.
PS: If anyone's been down this calling-a-dll-from-Perl-for-Win32
road before, I would be very glad to hear from you.
[1] http://www.alphalink.com.au/~mjd/VISA.xs
[2] http://www.alphalink.com.au/~mjd/typemap
--
| mailto:[EMAIL PROTECTED] | Not the official view of: |
| mailto:[EMAIL PROTECTED] | Australian Calculator Opn |
| Certified Linux Evangelist! | Hewlett Packard Australia |