installing SWIG for python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jerry He

    #1

    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


Working...