468,133 Members | 1,439 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

installing SWIG for python

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

Aug 6 '05 #1
0 1044

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Andrew Collier | last post: by
reply views Thread by Helmut Zeisel | last post: by
1 post views Thread by Java and Swing | last post: by
2 posts views Thread by ajikoe | last post: by
10 posts views Thread by Bart Ogryczak | last post: by
1 post views Thread by Uberman | last post: by
reply views Thread by Basha J P M | last post: by
27 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.