473,322 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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 2387

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andrew Collier | last post by:
hello, i am not sure whether this problem relates to swig, python or my c++ compiler. +please forgive me if this is inappropriately posted but i am sure that someone +on this list must have some...
2
by: superprad | last post by:
Hi I am trying to write a python wrapper for a C code I have using swig. when i try to compile the _wrap.c i get a bunch of these warnings and errors can anyone help Steps I followed : $swig...
1
by: superprad | last post by:
Hi I am trying to write a python wrapper for a C code I have using swig. when i try to compile the wrap.c i get a bunch of these warnings and errors can anyone help $swig -python test_hk.c this...
2
by: ajikoe | last post by:
Hi, I tried to follow the example in swig homepage. I found error which I don't understand. I use bcc32, I already include directory where my python.h exist in bcc32.cfg. /* File : example.c...
0
by: stumblecrab | last post by:
Hello, I've looked at the swig example in the back of "programming python" (Lutz). Using gcc to compile a swig wrapper I'm getting lots of errors. Instead of using the cygwin python, I'm...
3
by: sapsi | last post by:
Hello, I'm not sure if this the correct list but here goes (and sorry for the noise). I've been attempting to wrap python around libhdfs. So far so good (i've attached the SWIG template at the...
3
by: Soren | last post by:
Hi, I went through the SWIG tutorial for the example named "simple". I managed to get to the first step, creating example_wrap.c using swig, and doing: "gcc -fpic -c example_wrap.c...
0
by: RLC | last post by:
Hello I am new to python SWIG. Recently I wrote a small program trying to import collada files(using colladadom) into python so I could use python cgkit to render them. However, during the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.