To create a minimal Cminor program:
Here's the contents of the source file minimal.cminor:
Every valid Cminor program has a nonmember function called main where the execution begins.
Here's the contents of the project file minimal.cminorp:
The project declaration names the project. The source declarations list path to each source file contained by the project.
If the build succeeds the compiler prints by default nothing to the screen. On successful build the compiler creates a directory named assembly under the project directory. Under the assembly directory, there's a debug directory for debug builds and release directory for release builds. That directory contains an assembly file with extension .cminora that can be executed using the Cminor virtual machine.
Here's the directory structure of the program:
| +--minimal | +--minimal.cminor | +--minimal.cminorp | +--assembly | +--debug | | | +--minimal.cminora | +--release | +--minimal.cminora
The minimal program does nothing so there's also no output. If no error occurs, an exit code value 0 is returned to the caller of the program.