Added warning/error codes. Added a flag to ignore missing definitions on export.