discourse says: Title seems unclear, is it a complete sentence?
g_irepository_get_shared_library – why return multiple names?
The returned name is used by the Nim bindings to access the libraries, I think Nim uses dlopen() for that. For most libs g_irepository_get_shared_library() returns a single name. But for GTK3 and glib we get two:
$ grep -A1 "# libraries:" ~/.nimble/pkgs/gintro-0.8.2/gintro/* | grep "," /home/salewski/.nimble/pkgs/gintro-0.8.2/gintro/glib.nim-# libgobject-2.0.so.0,libglib-2.0.so.0 /home/salewski/.nimble/pkgs/gintro-0.8.2/gintro/gtk.nim-# libgtk-3.so.0,libgdk-3.so.0
But for GTK4 only one. So first question: Why more than one at all.
Some years ago when I started with the bindings I just took the first one, and it worked. Now due to the libnice support request I looked at the generated binding modules again and noted that using the first name is OK for gtk, dlopen() seems to fail when I would use the second lib name. That is expected.
But for glib my choice should be wrong. But still it has worked in the last 4 years for all people, and indeed both lib names are working in the same way.
So I looked at the contained symbols with
nm -D /usr/lib64/libgobject-2.0.so.0 | grep g_list_free U g_list_free
So libgobject lists the glib symbols with the U tag. Is that the reason why libgobjects seems to work like libglib for use with dlopen?