[DEBUG] correct the library dependency order when compile binary or shared object