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 swig.org:
http://www.swig.org/tutorial.html
I have written example.c and example.i as described in the above tutorial. My first attempt at compiling the libraries was this:
Expand|Select|Wrap|Line Numbers
- $ swig -python example.i
But with example_wrap.c file i can able to produce _example.so shared object like
gcc -c example.c example_wrap.c \
-I/vobs/tsp/tools/PYTHON/include/python2.5
gcc -shared example.o example_wrap.o -o _example.so
and doing
ld -shared example.o example_wrap.o -o _example.so
and when iam trying to import from python like
import example
it is saying no module named example.
My first Question is that should i get example.py in folder and second Question is that if it is not neccessary then where i am going wrong ??
Please help me in this regard.
regards,
basha.