fix all compiling error and OBC/NMS dependencies