CSCI 112 software installation
instructions
There are three options for implementing your 112 assignments:
- Use tiglon.ecst.csuchico.edu (Sun) or jaguar.ecst.csuchico.edu
(Linux) (connect from home via
modem/DSL) using the program putty
- if you use a 56k modem, this is not a good option
- if you have DSL this is an ok option, but sometimes the
machines get overloaded and/or go down (sometimes for an entire weekend)
- Use a linux computer at home
- this can be a bit of work to set up, but if you are a CS major,
it
is the best option
- Install the UNIX emulator Cygwin on your windows machine at home
- takes about two hours (using a 56k modem) to set up
- an acceptable option for non-CS majors
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:
- GNU's C++ compiler, called g++ (version 3.4 or higher)
- make (a utility for managing the compilation of programs)
- gdb (GNU's debugger for g++)
- an editor (nano or vim are the popular choices)
- 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
- Create a directory c:\cygwin
- Go to http://www.cygwin.com
and download setup.exe to c:\cygwin
- Run c:\cygwin.exe
- Disable your virus checker (if it asks you to)
- Choose "Installation from Internet"
- Type "c:\cygwin" as the root directory
- Type "c:\cygwin" as the package directory
- Choose "direct connection"
- Choose a site to download the source from (I don't have any good
advice of which one)
- 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.
- Open the Devl menu and check the boxes for binutils, ddd, gcc,
gcc-core, gcc-g++, gdb, and make
- Open the Editor menu and check the boxes for joe, nano, and vim
- Open the Net menu and check the box for openssh
- If you are a UNIX user, you could look for other packages you
would like
- cygutils, file, and diff under utils menu
- less and more under the Text menu
- Once all the packages are selected, press the next button
- Wait, wait, and wait. On a 56k modem, it will take over
an hour
- When given the option, choose to have an icon placed on the
desktop.
- 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.