Skip to content

Makefile: Put --libs at the end of the linker command-line

Order matters in linker command-lines: objects on the left have their dependencies satisfied by objects on the right, so our objects should be on the left and the libraries should be on the right. With some compilers it works anyway due to "overlinking" - the output program gets an unnecessary dependency on GLib, which later becomes necessary when our own object gets linked into it - but other compilers default to -Wl,--as-needed, which defeats that.

Merge request reports