[mapserver-users] PythonMapscript Installation under Windows
Norman Vine
nhv at cape.com
Fri Oct 11 05:35:19 PDT 2002
Schuster writes:
>
> I tried to compile pythonMapscript (MS 3.6.2) under Windows 2000 with
Python
>
> 2.1.3, SWIG 1.3.15 and MSVC7 compiler, using Norman Vine's setup.py
script.
> I tried to modified it to reflect windows requirements concerning
directories
> and
>
> libraries.
> When I run the setup, there is a problem when building the MapScriptc
> extension.
> I get the following error (translated from german):
>
> mapscript_wrap.obj: error LNK2001: unresolved external Symbol
initMapscriptc
> build\temp.win32-2.1\Release\MapScriptc.lib: fatal error LNK 1120: 1
unresolved
Try changing your setup.py lines
## from ##
# make package directory and package __init__ script
mkpath("mapscript")
init_file=open(path.join("mapscript","__init__.py"),"w")
init_file.write("from MapScript import *\n")
init_file.close()
## to ##
# make package directory and package __init__ script
mkpath("mapscript")
init_file=open(path.join("mapscript","__init__.py"),"w")
init_file.write("from _mapscript import *\n")
init_file.close()
## AND from ##
# Description of the modules and packages in the distribution
packages = ['mapscript'],
ext_modules =
[Extension('MapScriptc', ['mapscript_wrap.c'],
## to ##
# Description of the modules and packages in the distribution
packages = ['mapscript'],
ext_modules = [
Extension('_mapscript', ['mapscript_wrap.c'],
This is due to naming conventions change recent swig distributions
Please let us know if this works !
Norman
More information about the MapServer-users
mailing list