|
Guide
to the Miracle C Compiler
Tutorial:
Writing, Saving, Compiling, and Running the "Hello World" program
|
|
This simple program displays
a jaunty line of text. It's a favorite "first day of class"
warhorse, presenting the "main" function, comments,and the #include
header.
1. Launch Miracle
C. 2. Create a source file. You can do this in one of three
ways:
- Click the
button
- Pressing Ctrl + N
- Click File and New
3. Type the following
code into the text window:
|
/*Hellowor.c*/
#include<stdio.h>
void
main()
{
printf("Hello,
world!");
}
|
4. Save your file. You
can do this in one of three
ways:
- Click the
button.
- Press Ctrl + S.
- Click File and Save
.
5. Name your file,preserving
the .c filename extension.
*Miracle
C will accept only file names of 8 characters or less, not including
the .c extension.
6. Compile your program.
You can do this in one of three ways:
After compiling, Miracle
C displays an output window showing the results of the compilation.
If the compilation was successful, you see something like this:

If
your output window looks like this, close it and proceed.
If your output window
shows error messages, see Understanding
common error messages.
7. Link your program.
You can do this in one of three ways:
- Click the
button.
- Press F7.
- Click Run and Build.
After
linking, Miracle C displays an output window showing the results of
the linking. If the linking was successful, you see something like
this:

If your output window
looks like this, close it and proceed.
If your output window
shows error messages, see Understanding common
error messages.
8. Run your program. You
can do this in one of three ways:
Here's what the output
of your program should look like:

Congratulations! You've just
written, compiled, and run your first program with Miracle C!
|