On 01/25/2018 05:14 PM, Tom Hughes wrote:
There seems to be a similar issue with perl extensions that use C++
failing to link due to missing libstdc++ symbols, eg:
I think in that case the issue is that libgdal is linked to libstdc++
but the perl GDAL.so module was wound up with direct references to
symbols in libstdc++ but isn't linking to it directly.
So I think that needs a fix in gdal rather than changing the default
libraries linked by perl.
In fact I guess the link should really use g++ not gcc?
Yes, shared object which use C++ and require C++ run-time library
support need to be linked with g++.
However, this does not extend to clients—if the library has a C-only
interface, then it can be linked with gcc into other libraries and
applications. The dynamic linker will take care of the rest.