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?
Sorry if I've missed discussion around this topic. I reviewed RFC 68, but didn't see any reference to this issue.
Even Rouault wrote:
> 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.