SWIG problems with gcc and Cygwin?

Michael Yanowitz m.yanowitz at kearfott.com
Tue Jun 27 17:26:14 EDT 2006


Thanks.
   It now works for me in Cygwin.
I would never have guessed to write it as a dll.

Michael Yanowitz

-----Original Message-----
From: python-list-bounces+m.yanowitz=kearfott.com at python.org
[mailto:python-list-bounces+m.yanowitz=kearfott.com at python.org]On Behalf
Of Norman Vine
Sent: Tuesday, June 27, 2006 4:21 PM
To: python-list at python.org
Subject: Re: SWIG problems with gcc and Cygwin?



"Michael Yanowitz"wrote
> >
>    I am just trying out SWIG, but quickly ran into problems.
> Using Cygwin gcc, I tried the following:
>
> 3)ran in cygwin:  swig -i python example.i

try
'swig -python example.i'

> 4)Attempted to run on cygwin:  ld -shared example.o example_wrap.o -o
> _example.so


try
$ gcc -I/usr/include/python2.4 -L/lib/python2.4/config --shared example.c
example_wrap.c -lpython2.4 -o _example.dll

$ python
Python 2.4.1 (#1, May 27 2005, 18:02:40)
[GCC 3.3.3 (cygwin special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from example import *
>>> get_time()
'Tue Jun 27 16:17:41 2006\n'

HTH

Norman

--
http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list