[geos-devel] RFC6 - Drop GEOS C++ API at GEOS 3.8

Sandro Santilli strk at kbt.io
Sun Oct 1 22:58:49 PDT 2017


On Sun, Oct 01, 2017 at 11:19:48PM -0400, Regina Obe wrote:

> Getting back to your option with ./configure, would it be possible to only allow enabling of the C++ API if it's being built as a static library.  I think our main issue is when it's shared.

I was thinking of a more explicit --enable-c++-headers-install
(or similar)

And for the compile-time warning (which could be a first step),
it could be a warning that's spit at compile time and only if you
don't define some macro like:

  #define I_KNOW_I_SHOULD_NOT_BE_USING_GEOS_CPLUSPLUS_API 1
  #include <geos.h>

The warning will give an hint about the macro, ofc :)

> So if you link dynamically you'd be forced to use the C-API since you are impacting other possible application use.  If done statically, we don't care cause you are mixing your own soup.

Static-only C++ library would mean statically linking it in
libgeos-c.so, which is currently dynamically-linked instead.

It could be a useful thing to do, but better gather more
opinions from packagers too.

--strk;


More information about the geos-devel mailing list