Hello Rob,
Sisyphus wrote:
----- Original Message -----
From: "Reinhard Pagitsch" <[EMAIL PROTECTED]>
To: <perl-xs@perl.org>
Sent: Tuesday, July 12, 2005 12:15 AM
Subject: Error: duplicate definition of argument 'sv_hFile' ignored in
Info.xs, line 404
Hello,
I try to compile a XS module with Activestate Perl 5.8.7.
The module is a private one and not delivered to CPAN.
Entering nmake after I called makefile.pl I get the following error
messages:
D:\RP\work.perl\Projekte\AFPDS>nmake
Microsoft (R) Program Maintenance Utility Version 7.00.8882
Copyright (C) Microsoft Corp 1988-2000. All rights reserved.
[ messages, code sniped ]
There are changes between 5.6.2 and 5.8.7 to the 'xsubpp' file (which is
where your error messages are being generated). I don't know precisely when
those changes occurred (xsubpp reports version 1.9508 in both cases), or if
they're the cause of the problem, but it might be a good place to start.
Other than that, it would might help if you could post some minimal example
(either as an XS file or Inline::C script) that demonstrates the problem.
Cheers,
Rob
I attach the XS file. I made some more tests with this example and found
if I remove the IN and OUT it compiles correctly.
e.g:
( the original: _testit(IN t, IN t1, OUT p, perror) )
long
_testit(t, t1, p, perror)
SV* t;
SV* t1;
long p;
SV* perror;
PREINIT:
long pagecount;
PerlIO* hFile = (PerlIO *)SvIV(t);
long docs = 1;
CODE:
{
p = 10;
pagecount = 10;
RETVAL = pagecount;
}
OUTPUT:
p
perror
RETVAL
regards,
Reinhard
P.S: I tryed to upload the whole module under the name Hello-0.01.tar.gz
to my directory (RPAGITSCH), but it seems that I can't do it. Ther was
no success message.
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "ppport.h"
#include "const-c.inc"
MODULE = Hello PACKAGE = Hello
INCLUDE: const-xs.inc
long
_testit(IN t, IN t1, OUT p, perror)
SV* t;
SV* t1;
long p;
SV* perror;
PREINIT:
long pagecount;
PerlIO* hFile = (PerlIO *)SvIV(t);
long docs = 1;
CODE:
{
p = 10;
pagecount = 10;
RETVAL = pagecount;
}
OUTPUT:
p
perror
RETVAL