hi, I've added a static lib added to my Build Options > Linker Settings > Other linker options list, like "../../../addons/ofxOsc/libs/oscpack/lib/win32/oscpack.a". I added this at the bottom of the list which resulted in linker errors that it
couldnt fnd hton_* etc..
I solved this by moving the line the oscpack.a in the other linker options list to just above -lws2_32.
Now, I'm wondering why this solved it?
I can also solve this problem by added libws2_32.a to the Compiler settings.
roxlu
Quote from: roxlu on August 09, 2009, 11:01:28 PM
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.
Hi roxlu,
the linker can also automatically resolve cyclic references so that the order of libraries be-
comes irrelevant. The corresponging linker option is
-Wl,--start-group <list> -Wl,--end-group.
<list> is used here a placeholder for your list of libraries.
You have to specify this option in the other linker settings.
Quote from: mariocup on August 10, 2009, 12:55:21 PM
the linker can also automatically resolve cyclic references so that the order of libraries be-
comes irrelevant.
Don't use that unless you can't do otherwise though, as this will take about 10-15 times as long to link.