c compile function