CSCI 340 Software Installation
Instructions
You can write the 340 assignments on windows, linux, or OSX.
If
you already use linux, I suggest you use linux. If you are a
windows user, I suggest you use windows. While linux tends to be
much faster, the time it would take to install and get use to linux is
non-trivial.
NOTE: If you use Windows or OSX test your programs on
jaguar.ecst.csuchico.edu to make sure they work correctly on Linux
(usually there are not any problems).
IMPORTANT: You must use the GNU compiler. When you turn in your
programs I will compile them using the GNU compiler. If you
use any
other compiler (Visual C++, Borland C++, etc) I will probably not be
able to compile your program.
You will need the following software:
- GNU's C++ compiler, called g++ (version 4.1 or higher on Linux, 3.4.4 or higher on Cygwin)
- OpenGL (graphics package used for a later assignment)
- make
- gdb (GNU's debugger for g++)
It will be possible to write all your assignments on jaguar.ecst.csuchico.edu using putty.
HOWEVER the Department machines go down for at least one weekend
every single semester. You will save yourself a lot of
frustration if you develop on your own machine.
Linux
Installation
All the above components come with standard Linux distribution.
The only thing you might have to
install is the FreeGLUT library (GLUT stands for openGL Utility
Toolkit). If you are using Fedora you can use www.rpmfind.net to
find a recent rpm for FreeGLUT, otherwise find it on the Web.
When installing GLUT, the file glut.h must live in /usr/include/GL.
If you are using FreeGLUT, glut.h is a wrapper for freeglut_std.h.
You also will need the glut library. Depending on the version,
it will have a name like libglut.so.3.8.0 and should be in /usr/lib.
If your install script does not create one for you, you will need
a symbolic link from libglut.so to the actual library (e.g.
libglut.so.3.8.0).
OSX installation
OpenGL and Glut should already be
installed.
makedepend appears to be installed on some OSX machines and not on others.
If $ which makedepend does not find it, you will have to go searching for it.
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, and Vista. 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 create 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
- gcc
- g++
- gdb
- make
- from the editors menu select
- gvim
- nano
- from the graphics menu select (we will need these in a later assignment)
- freeglut
- opengl
- 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
- Cygwin is a moving target. I did the following to get it
to work on my machine. Let me know if something is not working:
Using window's notepad (or some other editor) 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:/usr/X11R6/bin:$PATH
export USER=tyson
export HOME=/cygdrive/c/tyson
cd $HOME
Note: type "which makedepend" at the cygwin command prompt.
You should see "/usr/X11R6/bin/makedepend.exe" Let me know
if you get a "Command not found." message.