akheron / jansson

C library for encoding, decoding and manipulating JSON data
http://www.digip.org/jansson/
Other
3.02k stars 807 forks source link

func name conflict crash #689

Closed xfliu2665 closed 6 days ago

xfliu2665 commented 2 months ago

my lib let's named it test.so deponds on jansson.so, and my app deponds on test.so, but app also got a func named "json_object" which is conflicted with jansson.
so there will get a mess call in app which may lead to a crash,.

is there any way to avoid it under the case not change the code. because both jansson and my app is a open-source project, i don't want to invade the code

xfliu2665 commented 2 months ago

i found that jansson-2.11 will cause my app carsh, but when i update jansson verion to 2.14, the bug is gone, i wonder why?

akheron commented 6 days ago

Jansson has switched to using versioned symbols in v2.14 specifically to help with name clashes between libraries.