Re: [gdal-dev] undefined reference to `json_object_new_array linking with libgdal.a

2020-07-22 Thread Sebastiaan Couwenberg
On 7/22/20 8:38 PM, Luí s Moreira de Sousa wrote: > I work with GDAL installed from the Ubuntu GIS repository. There is no gdal for focal in the UbuntuGIS PPA. > I could not verify, but I doubt it is compiled with the > --with-hide-internal-symbols flag. The gdal packages in the UbuntuGIS PPA l

Re: [gdal-dev] undefined reference to `json_object_new_array linking with libgdal.a

2020-07-22 Thread Luí­s Moreira de Sousa
Hi again Even, I work with GDAL installed from the Ubuntu GIS repository. I could not verify, but I doubt it is compiled with the --with-hide-internal-symbols flag. This programme includes the Makefiles, I am just trying to compile it with minimal change. I experimented removing the link to sha

Re: [gdal-dev] undefined reference to `json_object_new_array linking with libgdal.a

2020-07-22 Thread Even Rouault
On mercredi 22 juillet 2020 08:46:56 CEST Luí­s Moreira de Sousa wrote: > Hi Even, thank you for the reply. > > libjson-c-dev is already installed in the system, and the linker can find > it: > > $ ld -ljson-c --verbose > [...] > == > ld: mode elf_x

Re: [gdal-dev] undefined reference to `json_object_new_array linking with libgdal.a

2020-07-22 Thread Luí­s Moreira de Sousa
Hi Even, thank you for the reply. libjson-c-dev is already installed in the system, and the linker can find it: $ ld -ljson-c --verbose [...] == ld: mode elf_x86_64 attempt to open /usr/local/lib/x86_64-linux-gnu/libjson-c.so failed attempt to open

[gdal-dev] undefined reference to `json_object_new_array linking with libgdal.a

2020-07-21 Thread Luí­s Moreira de Sousa
Dear all, I am trying to compile a programme on Ubuntu 20.04 that links with libgdal.a. The compiler fails with this message: /usr/bin/ld: /usr/lib/libgdal.a(ogrfeature.o): in function `OGRFeature::GetFieldAsSerializedJSon(int) const': (.text+0x3861): undefined reference to `json_object_new_arr

Re: [gdal-dev] undefined reference to `json_object_new_array linking with libgdal.a

2020-07-21 Thread Even Rouault
Luí­s, normally GDAL builds out-of-the-box regarding libjson-c on Ubuntu. You have 2 possibilities, install libjson-c-dev, or let GDAL use its internal copy of libjson-c. In your linking attempts, this should be rather -ljson-c than -ljson, but normally you shouldn't have to do that. Even --