From: tronix <bha...@gm...> - 2010-06-07 03:38:06
|
Hi all, http://old.nabble.com/file/p28800490/testincrement.i testincrement.i http://old.nabble.com/file/p28800490/testincrement.h testincrement.h http://old.nabble.com/file/p28800490/testincrement.cc testincrement.cc I'm trying to implement this function which just increments (please find the source attached) a value in c++. and then using swig trying to get this python extension. I'm doing this so that I can use swig for my project. First trying to get to terms with swig. I do not need extensive swig though. I used the following commands (referred to many tutorials found upon googling). swig -python -c++ testincrement.i g++ -c testincrement.cc testincrement_wrap.cxx -I/usr/include/python2.5 -I/usr/lib/python2.5 -I/usr/include/c++/4.2/ ld -shared -o _testincrement.so testincrement.o testincrement_wrap.o -lpython2.5 I do this after that in the same directory I start the python shell #python >>import testincrement This shows the error message : Traceback (most recent call last): File "<stdin>", line 1, in <module> File "testincrement.py", line 7, in <module> import _testincrement ImportError: ./_testincrement.so: undefined symbol: _ZNKSs4sizeEv Please let me know what is the problem here. Any pointers to this problem is also appreciated. Thanks ----- "tron"ix -- View this message in context: http://old.nabble.com/Swig-noob-question-tp28800490p28800490.html Sent from the swig-user mailing list archive at Nabble.com. |