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:
  1. GNU's C++ compiler, called g++ (version 4.1 or higher on Linux, 3.4.4 or higher on Cygwin)
  2. OpenGL (graphics package used for a later assignment)
  3. make
  4. 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

  1. Using windows explorer 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. Choose "Installation from Internet"
  5. press <next> button
  6. Type "c:\cygwin" as the root directory
  7. Leave the "all Users" and "Unix/binary" buttons checked
  8. press <next> button
  9. Use c:\cygwin as the package directory (this should be the default)
  10. press <next button>
  11. Leave the "Direct Connection" button checked
  12. press <next> button
  13. select a web-site to download from.  Usually mirrors.xmission.com works for me... but not always.
  14. press <next> button and wait
  15. You should now see a menu of items to select for download.  When you click on a "+" it opens the sub-directory.  
    1. from the Devel menu select
      1. gcc
      2. g++
      3. gdb
      4. make
    2. from the editors menu select
      1. gvim
      2. nano
    3. from the graphics menu select (we will need these in a later assignment)
      1. freeglut
      2. opengl
    4. from the Utils menu select
      1. cygutils
    5. from the Net menu select
      1. openssh
  16. press the next button and wait for all of cygwin to install
  17. I suggest you leave the "create icon on desktop" and "add icon to start menu" boxes checked and press finish.
  18. Using window's explorer, create a directory that Cygwin can use as your home directory.  I use C:\tyson
  19. 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.