fixed link order, added test case, worked on smt_cc