SWIG, sample program compile errors

Discussion in 'Perl' started by ReaprZero, Dec 18, 2003.

  1. ReaprZero

    ReaprZero Guest

    Hi,

    I'm using Cygwin and ActiveState perl to try to compile a sample
    application using SWIG. I'm using the short tutorial from
    http://www.swig.org/tutorial.html (the perl part of it), but with a
    simplified version of their example (just a void hello()
    {printf("Hello, world!\n");} and corresponding .i interface file,
    %module hello \ extern void hello();).

    I first do swig -perl5 hello.i which works fine.
    Then I do:
    bash-2.05b$ gcc -c hello.c hello_wrap.c -I/cygdrive/c/perl/lib/core

    Which results in (because of hello_wrap.c, created by swig):
    In file included from /cygdrive/c/perl/lib/core/sys/socket.h:18,
    from /cygdrive/c/perl/lib/core/perl.h:722,
    from hello_wrap.c:291:
    /usr/include/w32api/winsock.h:81:2: warning: #warning "fd_set and
    associated mac
    ros have been defined in sys/types. This can cause runtime
    problems with W3
    2 sockets"
    In file included from /cygdrive/c/perl/lib/core/sys/socket.h:20,
    from /cygdrive/c/perl/lib/core/perl.h:722,
    from hello_wrap.c:291:
    /cygdrive/c/perl/lib/core/win32.h:74:20: direct.h: No such file or
    directory
    In file included from /cygdrive/c/perl/lib/core/sys/socket.h:20,
    from /cygdrive/c/perl/lib/core/perl.h:722,
    from hello_wrap.c:291:
    /cygdrive/c/perl/lib/core/win32.h:361: warning: redefinition of
    `caddr_t'
    /usr/include/sys/types.h:112: warning: `caddr_t' previously declared
    here
    In file included from /cygdrive/c/perl/lib/core/win32.h:547,
    from /cygdrive/c/perl/lib/core/sys/socket.h:20,
    from /cygdrive/c/perl/lib/core/perl.h:722,
    from hello_wrap.c:291:
    /cygdrive/c/perl/lib/core/win32iop.h:217:1: warning: "clearerr"
    redefined
    In file included from /cygdrive/c/perl/lib/core/win32.h:73,
    from /cygdrive/c/perl/lib/core/sys/socket.h:20,
    from /cygdrive/c/perl/lib/core/perl.h:722,
    from hello_wrap.c:291:
    /usr/include/stdio.h:414:1: warning: this is the location of the
    previous defini
    tion
    In file included from /cygdrive/c/perl/lib/core/perl.h:722,
    from hello_wrap.c:291:
    /cygdrive/c/perl/lib/core/sys/socket.h:22:1: warning: "ENOTSOCK"
    redefined
    In file included from /usr/include/errno.h:9,
    from /cygdrive/c/perl/lib/core/perl.h:715,
    from hello_wrap.c:291:
    /usr/include/sys/errno.h:119:1: warning: this is the location of the
    previous de
    finition



    I've got the latest cygwin, perl v5.6.1 built for
    MSWin32-x86-multi-thread build 633 from activestate, and the latest
    swigwin (swig for windows). I'm on WinXP.

    Anyone have any idea what's going on? I've read lots of documentation
    and searched google to no avail. Any help would be greatly
    appreciated!

    Thanks,
    Alex Ehlke
     
    ReaprZero, Dec 18, 2003
    #1
    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. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    967
    Mark Goldin
    Jan 17, 2004
  2. Jake
    Replies:
    0
    Views:
    562
  3. Kevin Dahlhausen
    Replies:
    3
    Views:
    659
    Kevin Dahlhausen
    Sep 14, 2004
  4. Swig compile errors

    , Jun 1, 2005, in forum: Python
    Replies:
    2
    Views:
    429
  5. Nagaraj
    Replies:
    1
    Views:
    876
    Lionel B
    Mar 1, 2007
Loading...

Share This Page