<strong>Guide</strong> <strong>to</strong> <strong>the</strong> <strong>Miracle</strong> C <strong>Compiler</strong>Here's how <strong>to</strong> add a shortcut <strong>to</strong> your Windows desk<strong>to</strong>p:1. Open <strong>the</strong> C:\MCW folder.2. Right click <strong>the</strong> icon.3. Click Send <strong>to</strong>.4. Click Desk<strong>to</strong>p As Shortcut.Now you can start <strong>Miracle</strong> C by clicking <strong>the</strong> icon on your desk<strong>to</strong>p.Here's how <strong>to</strong> add <strong>Miracle</strong> C <strong>to</strong> your Programs menu:1. Click Start, point <strong>to</strong> Settings, and <strong>the</strong>n click Taskbar & Start Menu.2. Click <strong>the</strong> Start Menu Programs tab.3. Click Add, and <strong>the</strong>n click Browse.Back <strong>to</strong> How do I...?4. Locate , <strong>the</strong>n double click it.5. Click Next, <strong>the</strong>n double-click <strong>the</strong> menu on which you want <strong>the</strong> program <strong>to</strong> appear.6. Type <strong>the</strong> name that you want <strong>to</strong> see on <strong>the</strong> Programs menu (for example, "<strong>Miracle</strong> C ", <strong>the</strong>n clickFinish.Adjusting <strong>the</strong> font your source code is displayed in<strong>Miracle</strong> C's default font is 8-point Courier New. To change <strong>the</strong> font, follow <strong>the</strong>se steps:1. After creating your source file, click File and <strong>the</strong>n click Font.2. Select font size and style, <strong>the</strong>n click OK.Back <strong>to</strong> How do I...?Checking path informationPath information tells <strong>the</strong> compiler where <strong>to</strong> look for <strong>the</strong> files it needs <strong>to</strong> compile your source code. You must besure that <strong>the</strong> compiler's path information accurately reflects <strong>the</strong> location not only of <strong>the</strong> Mcw.exe program, but alsoof <strong>the</strong> o<strong>the</strong>r files which accompanied Mcw.exe in <strong>the</strong> download.To check <strong>the</strong> path information, follow <strong>the</strong>se steps:1. In Windows Explorer, locate . Make sure that <strong>the</strong> "Include" folder and <strong>the</strong> "ccl.lib" and"ledit.dll" files are in <strong>the</strong> same location as Mcw.exe. If <strong>the</strong>y aren't, find <strong>the</strong>m and move <strong>the</strong>m.2. Right click , <strong>the</strong>n click Properties.3.Click <strong>the</strong> General tab.http://www.c-compiler.com/guide/index.html (10 of 14) [2/09/2001 8:11:03 AM]
<strong>Guide</strong> <strong>to</strong> <strong>the</strong> <strong>Miracle</strong> C <strong>Compiler</strong>4. Note <strong>the</strong> location information.5. In <strong>the</strong> <strong>Miracle</strong> C menu bar, click Options, <strong>the</strong>n click <strong>Compiler</strong>.6. Look at <strong>the</strong> Base path information. It should be identical <strong>to</strong> <strong>the</strong> location information you saw inWindows Explorer. If it isn't, change it.7. Look at <strong>the</strong> Include path information. It should be identical <strong>to</strong> <strong>the</strong> Base path information, but with\include added. If it isn't, change it.8. Click OK.Back <strong>to</strong> How do I...?9. In <strong>the</strong> <strong>Miracle</strong> C menu bar, click Options, <strong>the</strong>n Linker.10. Look at <strong>the</strong> library path information. It should be identical <strong>to</strong> <strong>the</strong> Base path information. If it isn't,change it.Moving <strong>the</strong> compiler <strong>to</strong> ano<strong>the</strong>r direc<strong>to</strong>ry or renaming <strong>the</strong> compilerYou can move or rename <strong>the</strong> MCW folder just as you would any o<strong>the</strong>r Windows folder. However, if you move orrename MCW, or if you remove <strong>the</strong> contents of MCW and place <strong>the</strong>m in ano<strong>the</strong>r folder, you must change <strong>Miracle</strong>C's path information <strong>to</strong> reflect <strong>the</strong> move. If you do not, <strong>the</strong> compiler will be unable <strong>to</strong> <strong>to</strong> find <strong>the</strong> files it needs <strong>to</strong>process your source code.After moving or renaming <strong>the</strong> MCW folder, adjust <strong>the</strong> compiler path information by following <strong>the</strong>se steps:1. On <strong>the</strong> <strong>Miracle</strong> C menu bar, click Options, <strong>the</strong>n <strong>Compiler</strong>.2. In <strong>the</strong> "Base path" field, type <strong>the</strong> current path information. For example, if you have moved <strong>the</strong>entire MCW file <strong>to</strong> <strong>the</strong> desk<strong>to</strong>p, type C:\windows\desk<strong>to</strong>p\mcw. If you have left <strong>the</strong> folder in <strong>the</strong> C:\direc<strong>to</strong>ry, but renamed it "<strong>Compiler</strong>", type C:\<strong>Compiler</strong>.3. In <strong>the</strong> "Include path" field, type <strong>the</strong> same path information, <strong>the</strong>n add \include. Example:C:\windows\desk<strong>to</strong>p\mcw\include.4. Click OK.5. On <strong>the</strong> <strong>Miracle</strong> C menu bar, click Options, <strong>the</strong>n Linker.6. In <strong>the</strong> "Library path" field, type <strong>the</strong> same path information that you typed in <strong>the</strong> "Base path" field.7. Click OK.Back <strong>to</strong> How do I...?Understanding Common Error MessagesWhen a compiler translates your source code in<strong>to</strong> object code, it expects <strong>to</strong> find code that conforms <strong>to</strong> C language rules. If itfinds anything that doesn't conform <strong>to</strong> <strong>the</strong> rules, it displays an error message in <strong>the</strong> output window.Error messages can have a variety of causes: faulty path information, missing header files, undeclared variables, and so forth.Most of <strong>the</strong> error messages you are likely <strong>to</strong> get when compiling simple programs, however, are <strong>the</strong> result of "syntaxerrors"--flaws not in <strong>the</strong> logic of your program but in <strong>the</strong> expression of that logic. Syntax errors are often merelytypographical: missing semicolons, misplaced brackets, and so forth.Unfortunately, no compiler can simply tell you "You forgot <strong>the</strong> semicolon after <strong>the</strong> statement," or "You forgot <strong>the</strong> header file."It can only tell you what it expected <strong>to</strong> find, but did not find, in your code. Because of this, C compiler error messages can becryptic. With a little practice, though, you will be able <strong>to</strong> quickly locate and fix common errors in your code based on <strong>Miracle</strong>C's error messages.The table below provides brief explanations of some of <strong>the</strong> most common error messages returned by <strong>Miracle</strong> C.http://www.c-compiler.com/guide/index.html (11 of 14) [2/09/2001 8:11:03 AM]