[gdal-dev] Starting a discussion on style and coding guidelines

Even Rouault even.rouault at spatialys.com
Thu May 5 02:28:14 PDT 2016


Le jeudi 05 mai 2016 11:09:48, Mateusz Loskot a écrit :
> On 5 May 2016 at 01:45, Even Rouault <even.rouault at spatialys.com> wrote:
> > Of the potential issues with requiring C++11, I can think of OSGeo4W. It
> > is mostly(completely?) built with Visual Studio 2010. And from
> > https://msdn.microsoft.com/en-us/library/hh567368.aspx , support of C++11
> > is only partial in VS 2010
> 
> VS2013 is the lowest version sensible to consider regarding C++11 support.
> 
> > On the other hand regarding dependencies of GDAL, the binary propritary
> > SDKs with a C++ API could be a problem, although they will likely move
> > on too. - FileGDB SDK 1.4: available for VS2010, VS2012, VS2013
> > - ECW SDK 5.2.1: available for VS2010, VS2012, VS2013
> 
> AFAICT, GDAL built using VS2015 links against the 5.2.1 version fine.

Do you link against the VS2013 .lib ?
> 
> > - MrSID SDK: I didn't check. Perhaps Kirk can tell us ?
> 
> Similarly to the ECW above, version 9.1.0 links fine too.
> 
> > But I'm not sure about the compatibility of C++11 build against non-C++11
> > builds in the VS realm : can a GDAL C++11 build link against a library
> > built without C++11 enabled ? Will not there be ABI problems ?
> 
> Although mixing C run-time libraries is a bad idea generally,
> kosher C APIs should be fine.

I'm not too worried about C ABI. My mention of C++03 ABI vs C++11 ABI was for 
the dependencies with those SDK that we use through their C++ API. In GCC 
world, with same compiler but with different -std=... flags, there have been 
troubles ( https://gcc.gnu.org/wiki/Cxx11AbiCompatibility , 
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html ), so I 
was wondering how the situation is in the VS world.
Actually since I mention this, the issue does apply to Linux too. Looking at 
the C++11 Linux build ( 
https://github.com/rouault/gdal_coverage/blob/trunk_gcc4.8_stdc11/.travis.yml 
) , I see I couldn't build against FileGDB with -std=c++11. This was a 
compilation issue with its headers, rather than a link/runtime issue.


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list