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
- when you install Linux you get all the software you need for
this class
- 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++) and ddd (GNU's graphical debugger)
- an editor (nano and vim are the popular choices, scite is also a
good option)
- 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.
Cygwin
Installation (do this if you want to use windows)
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
- Using windows explorer reate a directory c:\cygwin
- Go to http://www.cygwin.com
and download setup.exe to c:\cygwin
- Run c:\cygwin.exe
- Choose "Installation from Internet"
- press <next> button
- Type "c:\cygwin" as the root directory
- Leave the "all Users" and "Unix/binary" buttons checked
- press <next> button
- Use c:\cygwin as the package directory (this should be the
default)
- press <next button>
- Leave the "Direct Connection" button checked
- press <next> button
- select a web-site to download from. Usually
mirrors.xmission.com works for me... but not always.
- press <next> button and wait
- You should now see a menu of items to select for download.
When you click on a "+" it opens the sub-directory.
- from the Devel menu select
- ddd
- gcc
- g++
- gdb
- make
- from the editors menu select
- gvim
- nano
- from the Utils menu select
- cygutils
- from the Net menu select
- openssh
- press the next button and wait for all of cygwin to install
- I suggest you leave the "create icon on desktop" and "add icon to
start menu" boxes checked and press finish.
- Using window's explorer, create a directory that Cygwin can use
as your home directory. I use C:\tyson
- Using window's notepad create a file named "profile" in the
directory C:\cygwin\etc put in the following text but use the home
directory and username you chose. Make sure you see the "." after
the PATH= :
export
PATH=.:/cygdrive/c/cygwin/bin:$PATH
export USER=tyson
export HOME=/cygdrive/c/tyson
cd $HOME
Now you are ready to use Cygwin. If the following tasks work, you
probably have Cygwin installed correctly:
- Open a Cygwin window by clicking on the Cygwin icon. It
should be a window with a black background and the prompt should be
"bash-3.00$ "
- Type <pwd> return. You should see the directory you
specified as your HOME directory in the profile file. If not,
there is a problem with your profile file.
- Download a test C++ file from my website. Replace the
tyson@jaguar with your username @jaguar
- sftp tyson@jaguar.ecst.csuchico.edu
- answer yes to the security question
- enter your ecst password
- the prompt "sftp> " should be on the screen
- type the following EXACTLY:
/var/www/tyson/112/src/cygwin/hello.cpp
- type quit
- Now check to see if hello.cpp was downloaded to your current
directory using the ls command: $ ls
- If it is there you can compile and run it:
- $ g++ hello.cpp
- $ a.exe
- If you see "Hello world" on the screen your install is correct.