<div>Dear all,<br></div><div><br></div><div>I am trying to compile a programme on Ubuntu 20.04 that links with libgdal.a. The compiler fails with this message: <br></div><div><br></div><div>/usr/bin/ld: /usr/lib/libgdal.a(ogrfeature.o): in function `OGRFeature::GetFieldAsSerializedJSon(int) const':<br></div><div>(.text+0x3861): undefined reference to `json_object_new_array'<br></div><div><br></div><div>If I understand it correctly, this means the json  library is not being found. I thus made sure ld can actually find it:<br></div><div><br></div><div>$ ld -ljson --verbose<br></div><div>[...]<br></div><div>==================================================<br></div><div>ld: mode elf_x86_64<br></div><div>attempt to open /usr/local/lib/x86_64-linux-gnu/libjson.so failed<br></div><div>attempt to open /usr/local/lib/x86_64-linux-gnu/libjson.a failed<br></div><div>attempt to open /lib/x86_64-linux-gnu/libjson.so succeeded<br></div><div>/lib/x86_64-linux-gnu/libjson.so<br></div><div>[...]<br></div><div><br></div><div>I also added the -ljson flag but the compiler still fails. Is there something else missing beyond the json library? <br></div><div><br></div><div class="protonmail_signature_block"><div class="protonmail_signature_block-user"><div>Thank you.<br></div><div>-- <br></div><div>Luís<br></div><div><br></div></div><div class="protonmail_signature_block-proton">Sent with <a href="https://protonmail.com" target="_blank">ProtonMail</a> Secure Email.<br></div></div><div><br></div>