[gdal-dev] python 2.7 bindings with trunk (2.3)

Even Rouault even.rouault at spatialys.com
Fri Jan 5 10:37:57 PST 2018


On vendredi 5 janvier 2018 17:51:26 CET Gregory, Matthew wrote:
> Hi all,
> 
> I'm sure to show my ignorance here, but I've been periodically building both
> the 2.2 and trunk branches on Windows using MSVC for Python 2.7 (as I think
> the compiler version needs to match how Python itself was built [MSC v.1500
> 32 bit (Intel)]).  With the recent update in trunk requiring C++11, MSVC
> for Python 2.7 now errors out:
> 
>   c:\foss4g\gdal_trunk\gdal\port\cpl_port.h(187) : fatal error C1189:
>     #error :  Must have C++11 or newer.
> 
> Is there a way to compile the GDAL python bindings with still using MSVC for
> Python 2.7 -or- if I update to MSVC 14, can I still build bindings that
> will work with 2.7?

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

We should likely document that somewhere appropriate. Perhaps in
https://trac.osgeo.org/gdal/wiki/BuildingOnWindows

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180105/2eba2f6d/attachment.html>


More information about the gdal-dev mailing list