473,376 Members | 1,184 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,376 software developers and data experts.

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 1198

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

Similar topics

0
by: Jon Moldover | last post by:
Hi, I'm using Python in my win32 app by linking to the python23.dll. I'm trying to expose some c++ code in my app to Python so I can make application calls from Python scripts (according to the...
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...
8
by: Sean | last post by:
System is Redhat 9.0, Python 2.2.3, Zope 2.6.2 built OpenSSL from source: 2791797 Sep 30 14:50:15 2003 openssl-0.9.7c.tar.gz used configure options to set for /usr/local and...
0
by: Helmut Zeisel | last post by:
I want to build a static extension of Python using SWIG and VC++ 6.0 as described in http://www.swig.org/Doc1.3/Python.html#n8 for gcc. My file is testerl.i: ========================= %module...
1
by: Java and Swing | last post by:
I am trying to wrap some C code I have. Currently I have something like... defs.h ----------- typedef unsigned long MY_DIGIT; myapp.c ------------- void MakeDigits(MY_DIGIT digits) {
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...
10
by: Bart Ogryczak | last post by:
Hi, Im looking for some benchmarks comparing SWIG generated modules with modules made directly with C/Python API. Just how much overhead does SWIG give? Doing profile of my code I see, that it...
1
by: Uberman | last post by:
I have a bit of a odd arrangement here with SWIG, Python, Embedded Python and C++ classes exported into Python. Here's the plot: I have a class defined in a C++ DLL library. I am wrapping this...
0
by: Basha J P M | last post by:
I am beginner in python. I am working through the tutorial examples from http://www.swig.org/ and have run into some problems. I took the following command instructions from the tutorial on...
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...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.