Corrected library order + fixes needed to compile static libraries and executables...