Computer Science I
Spring 2001
Quick & Dirty LCC

  1. Download LCC onto your PC. Click on the two following links, each of which will download a file onto your PC. I suggest saving them on your desktop.

  2. Install LCC on your PC. Double-click on the lccwin32 icon. A window will pop up asking if you want to install the lcc-win32 system. Click on Yes. Next, a setup window will pop up. Click on Next. Then click on Yes to agree to the licensing terms. Then read the information screen and click on Next. Then select the destination directory for LCC. I suggest using c:\lcc. Type your destination directory in the form, as indicated, and click on Next. Then you can define a program group, and again click on Next. Now it is ready to install, so click on Install. This will take a couple of minutes. Then a window will pop up and say "Libraries generation finished." Click on OK. Then click on Finish.

    You can install the LCC documentation by following a similar procedure, starting by double-clicking on the lccdoc icon (on your desktop, or wherever you placed it when downloading).

  3. Create a folder where you will keep your assignments, e.g., c:\mc140.

  4. Start up LCC, by selecting from the Start menu: Start - Programs - lcc-win32 - lcc-win32. The wedit program will start up and show a window containing a sample program. Conveniently, this is the standard "hello world" program which you have to complete for assignment #1. You can compile and link this program by pressing the F9 function key. You can execute the program by pressing the Ctrl and F5 keys at the same time.

  5. Create a new project. Select Project - Create.... Then in the Project name? box, enter ass1 and click on Ok.

    Then a window will open called Definition of a new project. The first field, Name of the project will already say ass1. The second field, Path - Working directory will be blank. Type c:\mc140\ass1 in that field. You can leave the third field blank (it will get filled in automatically). Now click on Create.

    Then a window will open called Information. It asks "Do you want to use the wizard to generate the application skeleton?" Click on No.

    Then a window will open called Add source files to the project. There is a field near the bottom of the window that says File name. In here, type the name of your source code file: <your-user-name>-ass1.c. For example, I'll type sklarel-ass1.c. Then click on Open.

    Then a window will open called Source files for project (null). The file name you just entered should appear in that window (it is probably listed in capitol letters). Click on Validate.

    Then a window will open called Compiler settings. Just click on Next.

    Then a window will open called Linker settings. Again, just click on Next.

    Then a window will open called Debugger settings. Click on Finish.

    Finally, an edit window will open with the name of your source code file as the title of that window (e.g., sklarel-ass1.c). Type in your code here.

  6. Create your source code. The last step, above, leaves you in the wedit editing program that comes with LCC. It has syntax highlighting, so that different parts of your program are shown in different colors, based on their meanings. You will make all changes to your source code here.

  7. Compile and link your program by pressing the F9 function key.

  8. Run your program by pressing Ctrl-F5 .

  9. Submit your program by copying your source code file (only!!!) (<your-user-name>-ass1.c) into my professor's folder in the OCF.

    If you are in the OCF (a.k.a. SLSC in O'Neill), open the Professor's folders, as follows:

    If you are not in the OCF but you are on the BC Windows-NT network, you can access my professor's folder by doing the following:

    Now, double click the folder with my user name (sklarel). Then COPY and PASTE your file (<your-user-name>-ass1.c) into my MC140.01 folder.