Now, I'm wondering why this solved it?Order matters when linking. If liba requires libb than you cannot link libb before liba as the linker cannot resolve the symbols.
-Wl,--start-group <list> -Wl,--end-group.
the linker can also automatically resolve cyclic references so that the order of libraries be-Don't use that unless you can't do otherwise though, as this will take about 10-15 times as long to link.
comes irrelevant.