Problems with

Discussion in 'Perl Misc' started by TLOlczyk, Mar 2, 2004.

  1. TLOlczyk

    TLOlczyk Guest

    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 -IE:/Perl/lib/CORE/ test.c

    cl.exe version is 12.00.8804 (VC++ 6.0 Sp2 ).
    I get a ton of errors, the first of which is:

    >>E:/Perl/lib/CORE/win32.h(313) : error C2143: syntax error : missing ')' before '*'


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

    Any ideas.
    The reply-to email address is .
    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.
    TLOlczyk, Mar 2, 2004
    #1
    1. Advertising

  2. TLOlczyk

    Ben Morrow Guest

    wrote:
    > 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 -IE:/Perl/lib/CORE/ test.c

    > cl.exe version is 12.00.8804 (VC++ 6.0 Sp2 ).
    > I get a ton of errors, the first of which is:
    >
    > >>E:/Perl/lib/CORE/win32.h(313) : error C2143: syntax error : missing ')' before '*'

    >
    > 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

    --
    Musica Dei donum optimi, trahit homines, trahit deos. |
    Musica truces molit animos, tristesque mentes erigit. |
    Musica vel ipsas arbores et horridas movet feras. |
    Ben Morrow, Mar 2, 2004
    #2
    1. Advertising

  3. TLOlczyk

    TLOlczyk Guest

    On Tue, 2 Mar 2004 05:07:10 +0000 (UTC), in comp.lang.perl.misc you
    wrote:

    >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:
    >> cl -nologo -I. -Iwin32 -Ilib/CORE -EP lib/CORE/win32.h | perl -ne"print if /extern.*my_my_fstat/"

    and it produced two lines:
    >>win32.h
    >>extern int my_fstat(int fd, Stat_t *sbufptr);


    The reply-to email address is .
    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.
    TLOlczyk, Mar 2, 2004
    #3
  4. TLOlczyk

    Ben Morrow Guest

    wrote:
    > On Tue, 2 Mar 2004 05:07:10 +0000 (UTC), in comp.lang.perl.misc you
    > wrote:
    >
    > >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.


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

    > >>win32.h
    > >>extern int my_fstat(int fd, Stat_t *sbufptr);


    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

    --
    Musica Dei donum optimi, trahit homines, trahit deos. |
    Musica truces molit animos, tristesque mentes erigit. |
    Musica vel ipsas arbores et horridas movet feras. |
    Ben Morrow, Mar 2, 2004
    #4
  5. TLOlczyk

    Sisyphus Guest

    TLOlczyk wrote:

    >
    > 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

    --
    To reply by email u have to take out the u in kalinaubears.
    Sisyphus, Mar 2, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Srinivas Kanakapally [MSFT]

    RE: Vs.net Server Explorer Diagram Problems

    Srinivas Kanakapally [MSFT], Jul 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    2,941
    Srinivas Kanakapally [MSFT]
    Jul 8, 2003
  2. BestNews
    Replies:
    0
    Views:
    3,151
    BestNews
    Aug 20, 2003
  3. Susan Baker
    Replies:
    2
    Views:
    802
    kelvSYC
    Jun 26, 2005
  4. Shelly

    Problems, problems for newbie

    Shelly, Sep 2, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    2,171
    Shelly
    Sep 3, 2007
  5. Sak Na rede
    Replies:
    0
    Views:
    404
    Sak Na rede
    Jan 30, 2009
Loading...

Share This Page