Thanks Even,

Even Rouault wrote:
> Define
> SET DISTUTILS_USE_SDK=1
> SET MSSdk=1
>  
> so that the active MSVC version is used when building the Python
> bindings. This is what is used in gisinternals builds & appveyor builds

That worked for me (although I would have never found it, so I appreciate your 
help).  I've put these two lines in gdal/swig/makefile.vc, e.g.

--- a/gdal/swig/makefile.vc
+++ b/gdal/swig/makefile.vc
@@ -20,6 +20,8 @@ python: gdalvars
         $(SWIG) -c++ -python -modern -new_repr -I../include/python 
-I../include/python/docs -o extensions/ogr_wrap.cpp -outdir osgeo 
..\include\ogr.i
         $(SWIG) -c++ -python -modern -new_repr -I../include/python 
-I../include/python/docs -o extensions/gnm_wrap.cpp -outdir osgeo 
..\include\gnm.i
         $(SWIG) -c++ -python -modern -new_repr -I../include/python 
-I../include/python/docs -o extensions/gdal_array_wrap.cpp -outdir osgeo 
..\include\gdal_array.i
+        set DISTUTILS_USE_SDK=1
+        set MSSdk=1
         $(PYDIR)\python.exe setup.py build
        cd ..

Is this a solution that would work across all branches and compilers?

thanks, matt
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to