Move required libs after the object file for the shared lib compilation.