Problems with

T

TLOlczyk

Activestate Perl v 5.8.0
I was trying to compile a Perl extension and kept getting tons of
errors.

So in debugging i reduced everything to a file of a single line.

#include "win32.h"

I compiled this file with the command line:cl.exe version is 12.00.8804 (VC++ 6.0 Sp2 ).
I get a ton of errors, the first of which is:

Line 313 of win32.h is
extern int my_fstat(int fd, Stat_t *sbufptr);

Any ideas.
The reply-to email address is (e-mail address removed).
This is an address I ignore.
To reply via email, remove 2002 and change yahoo to
interaccess,

**
Thaddeus L. Olczyk, PhD

There is a difference between
*thinking* you know something,
and *knowing* you know something.
 
B

Ben Morrow

Activestate Perl v 5.8.0
I was trying to compile a Perl extension and kept getting tons of
errors.

So in debugging i reduced everything to a file of a single line.

#include "win32.h"

I compiled this file with the command line:
cl.exe version is 12.00.8804 (VC++ 6.0 Sp2 ).
I get a ton of errors, the first of which is:


Line 313 of win32.h is
extern int my_fstat(int fd, Stat_t *sbufptr);

What do you get if you run, from the top-level perl source directory,

cl -nologo -I. -Iwin32 win32/win32.h | perl -ne"print if /extern.*my_fstat/"

(add appropriate -Is to find your VC headers)?

Ben
 
T

TLOlczyk

What do you get if you run, from the top-level perl source directory,

cl -nologo -I. -Iwin32 win32/win32.h | perl -ne"print if /extern.*my_fstat/"

First I get a bunch of errors. win32.h is in lib/CORE. So I fixed
that. Then it complained wrong file type. So I added -EP
( preprocess file to stdout ).

The final command line was:
The reply-to email address is (e-mail address removed).
This is an address I ignore.
To reply via email, remove 2002 and change yahoo to
interaccess,

**
Thaddeus L. Olczyk, PhD

There is a difference between
*thinking* you know something,
and *knowing* you know something.
 
B

Ben Morrow

First I get a bunch of errors. win32.h is in lib/CORE. So I fixed
that.

Oh right... sorry, I was working from the perl *source* directory. I
guess you don't have one around.

Bleeah. I'm thinking this is a red herring: Stat_t is defined by
dosish.h which is included by perl.h before including win32.h. Will the
file

#include "perl.h"

int main() { return 0; }

compile? If so, what headers does your extension's XS file include?

Ben
 
S

Sisyphus

TLOlczyk said:
Line 313 of win32.h is
extern int my_fstat(int fd, Stat_t *sbufptr);

I have an ActiveState build of perl with that same line in it. It also
produces the error you reported, along with a number of other errors.

I also have some perl installations I built myself with MSVC++ 6 and
another perl installation built with MSVC++ 7 (.NET). There is no
problem at all with the Win32.h files in those builds.
In them, line 313 appears as:
extern int my_fstat(int fd, struct stat *sbufptr);

I have no idea what causes the difference in the header files between
the ActiveState builds and the perls that I built with MSVC++. Afaik
they should all be the same.

I think you'll find that the problem disappears for you if you build
perl yourself from source - and that's probably the quickest solution.

I could send you my win32.h, perlio.h, and win32iop.h if you think that
would work - but I wouldn't be surprised if the problem runs deeper than
that.

Cheers,
Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,231
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top