Mapscript & Python

Nicholas Lo nicklo at siliconcreation.com
Sat Nov 11 04:58:15 EST 2000


Hi everyone,


I'm using MapServer 3.3.011 and I'm trying to create the Python
Mapscript wrapper using SWIG 1.1p5. However, it has been unsuccessful.
Here are my steps:

1.
Under mapserver/mapscript
cp mapscript.i python

2.
cd python

3.
swig -shadow -docstring -dhtml -python mapscript.i

4.
gcc mapscript_wrap.c -I/usr/include/python1.5 -shadow -o
mapscriptcmodule.so

After all these steps, I've got
mapscript.py mapscript_wrap.c mapscriptcmodule.so mapscript_wrap.html

When I try to

>>>import mapscript

under IDLE 0.5, I've got

Traceback (innermost last):
  File "<pyshell#0>", line 1, in ?
    import mapscript
  File "/root/NickPy/mapscript.py", line 2, in ?
    import mapscriptc
ImportError: /root/NickPy/mapscriptcmodule.so: undefined symbol:
msSaveImage
>>>

I really dont understand why. I can see 'msSaveImage' inside
mapscript.py & mapscript_wrap.c, however it's not inside mapscript.i. I
wonder if there's any step I'm missing or if there is any hints in
creating the Python Mapscript wrapper.

Please kindly help :)


-- Nick


PS:
System configuration -
SuSE Linux 6.4
Python 1.5.2
MapServer 3.3.011



More information about the mapserver-users mailing list