fix compile error and relocate lib path