installing SWIG for python

J

Jerry He

Hi,
I just installed SWIG on Windows(Cygwin) and tried
to use it to compile some of the example python
programs.

For the first two commands it produced no error
swig -python example.i
gcc -c example.c example_wrap.c -I \
/usr/include/python2.4

For the third one however
ld -shared example.o example_wrap.o -o _example.so

It gave me a long list of errors listed at the end of
this email.

The error messages were rather baffling because the C
file that was to be made into a python Module was a
simple gcd function, it doesn't need strlen, or any of
the other C functions, and much less Tcl_Append, what
does this have to do with Tcl?

Any help or suggestions on this would be
appreciated...

-Jerry



example_wrap.o:example_wrap.c:(.text+0x1cb3):
undefined reference to `strlen'
example_wrap.o:example_wrap.c:(.text+0x1ccf):
undefined reference to `strchr'
example_wrap.o:example_wrap.c:(.text+0x1cf7):
undefined reference to `strstr'
example_wrap.o:example_wrap.c:(.text+0x1d5d):
undefined reference to `Tcl_Append
Element'
example_wrap.o:example_wrap.c:(.text+0x1e09):
undefined reference to `Tcl_SetRes
ult'
example_wrap.o:example_wrap.c:(.text+0x1e40):
undefined reference to `Tcl_GetStr
ingFromObj'
example_wrap.o:example_wrap.c:(.text+0x1e56):
undefined reference to `strcmp'
example_wrap.o:example_wrap.c:(.text+0x1e80):
undefined reference to `strcmp'
example_wrap.o:example_wrap.c:(.text+0x1ec6):
undefined reference to `Tcl_GetStr
ingFromObj'
example_wrap.o:example_wrap.c:(.text+0x1edc):
undefined reference to `strcmp'
example_wrap.o:example_wrap.c:(.text+0x1f48):
undefined reference to `Tcl_GetObj
Result'
example_wrap.o:example_wrap.c:(.text+0x1f50):
undefined reference to `Tcl_Duplic
ateObj'
example_wrap.o:example_wrap.c:(.text+0x1f70):
undefined reference to `Tcl_GetStr







____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top