On Mon, 14 Jun 2004, karthik kar wrote:
> I am using Active State Perl to call functions in C. The
> interface between these is done through Swig. It generates
> run time error when I try to access file pointer in C
> opened in Perl. The message shown at run time is
>
> "The instruction at "0x77f88216" referenced memory at
> "0x00000010". The memory could not be written".
I tried this with ActivePerl 809, Windows XP, VC++ 6, and
Swig-1.3.20, and it worked OK. One change I used (which I
think just fixes a warning) is in swig.i from your
$target = PerlIO_findFILE(IoIFP(sv_2io($source)));
to
$1 = PerlIO_findFILE(IoIFP(sv_2io($input)));
Other than that, and using the Makefile.PL:
=============================================================
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
my %opts = (
'NAME' => 'cprog',
'VERSION_FROM' => 'cprog.pm', # finds $VERSION
'OBJECT' => 'cprog_wrap.o cprog.o',
);
WriteMakefile(%opts);
=============================================================
and the resulting
perl Makefile.PL
nmake
to generate the lib, the major difference seems
to be using VC++ 6, rather than 7. Have you run
into any problems compiling other XS-based modules
using VC++ 7 and using them under ActivePerl?
--
best regards,
randy kobes
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs