Add basic build logic to compile classes.
Fix compile error.