On 24 March 2013 16:40, Markus Elfring wrote: > Would anybody like to help with further ideas to resolve the shown error > mesaages around "undefined references"? > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56709 In the other command (which you repeatedly failed to actually show, so noone could possibly answer you) at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56709#c3 the libraries come after the source file, so it's the correct and expected behaviour that you get different results. This is user error, not a bug. The 'ld' man page is very clear about this: The linker will search an archive only once, at the location where it is specified on the command line. If the archive defines a symbol which was undefined in some object which appeared before the archive on the command line, the linker will include the appropriate file(s) from the archive. However, an undefined symbol in an object appearing later on the command line will not cause the linker to search the archive again.