<div dir="ltr"><div class="gmail_default" style="font-family:comic sans ms,sans-serif">In the VS World...<br><br>If you delete C/C++ memory/objects in a DLL that has been compiled with the same VS compiler you are ok.<br><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">If you attempt to delete a memory/object in DLL/application compiled with a different version of the VS compiler all bets are off.<br><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">For example:<br><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Allocate an object in VS2010 compiled code delete in VS2015 compiled code, you will likely crash. <br><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">You will have to distribute the runtime distribution DLLs for the versions of VS that you used or your 3rd party DLLs used.<br><br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Regards<br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Damian<br></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 5 May 2016 at 10:28, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Le jeudi 05 mai 2016 11:09:48, Mateusz Loskot a écrit :<br>
> On 5 May 2016 at 01:45, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br>
> > Of the potential issues with requiring C++11, I can think of OSGeo4W. It<br>
> > is mostly(completely?) built with Visual Studio 2010. And from<br>
> > <a href="https://msdn.microsoft.com/en-us/library/hh567368.aspx" rel="noreferrer" target="_blank">https://msdn.microsoft.com/en-us/library/hh567368.aspx</a> , support of C++11<br>
> > is only partial in VS 2010<br>
><br>
> VS2013 is the lowest version sensible to consider regarding C++11 support.<br>
><br>
> > On the other hand regarding dependencies of GDAL, the binary propritary<br>
> > SDKs with a C++ API could be a problem, although they will likely move<br>
> > on too. - FileGDB SDK 1.4: available for VS2010, VS2012, VS2013<br>
> > - ECW SDK 5.2.1: available for VS2010, VS2012, VS2013<br>
><br>
> AFAICT, GDAL built using VS2015 links against the 5.2.1 version fine.<br>
<br>
</span>Do you link against the VS2013 .lib ?<br>
<span class="">><br>
> > - MrSID SDK: I didn't check. Perhaps Kirk can tell us ?<br>
><br>
> Similarly to the ECW above, version 9.1.0 links fine too.<br>
><br>
> > But I'm not sure about the compatibility of C++11 build against non-C++11<br>
> > builds in the VS realm : can a GDAL C++11 build link against a library<br>
> > built without C++11 enabled ? Will not there be ABI problems ?<br>
><br>
> Although mixing C run-time libraries is a bad idea generally,<br>
> kosher C APIs should be fine.<br>
<br>
</span>I'm not too worried about C ABI. My mention of C++03 ABI vs C++11 ABI was for<br>
the dependencies with those SDK that we use through their C++ API. In GCC<br>
world, with same compiler but with different -std=... flags, there have been<br>
troubles ( <a href="https://gcc.gnu.org/wiki/Cxx11AbiCompatibility" rel="noreferrer" target="_blank">https://gcc.gnu.org/wiki/Cxx11AbiCompatibility</a> ,<br>
<a href="https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html" rel="noreferrer" target="_blank">https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html</a> ), so I<br>
was wondering how the situation is in the VS world.<br>
Actually since I mention this, the issue does apply to Linux too. Looking at<br>
the C++11 Linux build (<br>
<a href="https://github.com/rouault/gdal_coverage/blob/trunk_gcc4.8_stdc11/.travis.yml" rel="noreferrer" target="_blank">https://github.com/rouault/gdal_coverage/blob/trunk_gcc4.8_stdc11/.travis.yml</a><br>
) , I see I couldn't build against FileGDB with -std=c++11. This was a<br>
compilation issue with its headers, rather than a link/runtime issue.<br>
<span class="im HOEnZb"><br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></div></div></blockquote></div><br></div>