[postgis-devel] Is posible to use function lwgeom_to_geojson in another c fuctions
Sandro Santilli
strk at kbt.io
Fri Jun 24 23:59:16 PDT 2016
On Fri, Jun 24, 2016 at 10:34:16PM +0200, Jan Michálek wrote:
> Hello
> I need a advice about this problem
> I'm trying to write some C fuction for making geojson as aggregate from
> records as full regular geojson with properties.
> I tried to use function lwgeom_to_geojson inside my code.
[...]
> And I`m able to compile this. But if I try use function in postgre, it get
> me an error
> ERROR: could not load library "/usr/lib/postgresql/jelejson.so":
> /usr/lib/postgresql/jelejson.so: undefined symbol: lwgeom_to_geojson.
>
> What i should do? Is posible to use this function like this?
You should statically link liblwgeom.a into your code, and avoid
exporting its symbols outside of your library.
Or lobby to change PostGIS to link to liblwgeom dynamically
and do they same yourself :)
--strk;
More information about the postgis-devel
mailing list