CSCI 112 software installation instructions

There are three options for implementing your 112 assignments:
  1. Use tiglon.ecst.csuchico.edu (Sun) or jaguar.ecst.csuchico.edu (Linux)  (connect from home via modem/DSL) using the program putty
  2. Use a linux computer at home
  3. Install the UNIX emulator Cygwin on your windows machine at home
The projects in this class will be written in C++.  There is an excellent C++ compiler called g++ available for free from GNU.  Your programs will be tested using the GNU compiler.  If you develop using a different compiler (e.g. Visual C++, Borland C++, etc.) your programs may not pass my testing.

You will need the following software:
  1. GNU's C++ compiler, called g++ (version 3.4 or higher)
  2. make (a utility for managing the compilation of programs)
  3. gdb (GNU's debugger for g++)
  4. an editor (nano or vim are the popular choices)
  5. scp or sftp so that you can turn in your programs
All of these are on the department Sun & Linux computers, and all are available for cygwin.

The rest of this file explains how to install cygwin UNIX emulator on your home computer.


Windows Installation

If you choose to use windows, you will need to download the cygwin UNIX emulator.  Cygwin allows you to open UNIX-like windows on your PC running XP, ME, 2000, NT.  It will allow you to write your entire program on your computer and then copy it to the department machines for final testing and to turn it in.

Here are the steps for installing Cygwin on your windows machine

  1. Create a directory c:\cygwin
  2. Go to http://www.cygwin.com and download setup.exe to c:\cygwin
  3. Run c:\cygwin.exe
  4. Disable your virus checker (if it asks you to)
  5. Choose "Installation from Internet"
  6. Type "c:\cygwin" as the root directory
  7. Type "c:\cygwin" as the package directory
  8. Choose "direct connection"
  9. Choose a site to download the source from (I don't have any good advice of which one)
  10. Each line in the next screen is a menu of packages you can download.  You will have to navigate this to make sure you get everything in the list above.  I think it is best to also download all the packages that are checked by default.
    1. Open the Devl menu and check the boxes for  binutils, ddd, gcc, gcc-core, gcc-g++, gdb, and make
    2. Open the Editor menu and check the boxes for joe, nano, and vim
    3. Open the Net menu and check the box for openssh
    4. If you are a UNIX user, you could look for other packages you would like
      1. cygutils, file, and diff under utils menu
      2. less and more under the Text menu
    5. Once all the packages are selected, press the next button
    6. Wait, wait, and wait.  On a 56k modem, it will take over an hour
    7. When given the option, choose to have an icon placed on the desktop.
    8. NOTE: setup.exe keeps track of what packages you have on your machine, and will not download them if you already have them.  Thus if you missed something, you can run setup.exe again, and select the packages that you missed.

Now create a directory for your home cygwin directory.  Cygwin will try to do this for you, but I think it is easiest to create one (I used C:\username) and then manually tell cygwin where it is.  You can tell cygwin where your home directory is by editing the file C:\cygwin\etc\profile and adding the following lines:

USER="username"
HOME="c:\username"

then comment out the seven lines after "Set up USER's home directory" by placing a # at the start of each line

Now when you click on the cygwin icon on your desktop, you will get a window that is running the bash shell, and your current directory should be c:\username.

The only potential problem at this point is your path.  The path in the UNIX world (remember that cygwin emulates the UNIX world) is a list of directories that contains commands.  So when you type "foo" at the command prompt, the shell looks in all the directories in the path for a file called "foo.exe".  Usually the default cygwin installation gets the path correct, but if nothing works in the cygwin window, you will have to fix your path.  Talk to me if you need help.