469,323 Members | 1,365 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

SWIG, sample program compile errors

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
Jul 19 '05 #1
0 2216

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Andrew Collier | last post: by
2 posts views Thread by superprad | last post: by
1 post views Thread by superprad | last post: by
2 posts views Thread by ajikoe | last post: by
reply views Thread by stumblecrab | last post: by
3 posts views Thread by sapsi | last post: by
3 posts views Thread by Soren | last post: by
reply views Thread by RLC | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.