emacs and g++ for Windows


emacs and g++ are available for Windows computers, and can be downloaded for free. The download and install process is not simple; you need to have some experience in downloading and installing software. If you've never done this before, find a friend with more experience who can help you.

You will need three things:

  1. djtarnt, an archiving/compression tool to unpack emacs
  2. NTemacs, the emacs version for Windows
  3. cygwin, a unix-like shell that runs in a DOS window, and which includes g++

djtarnt

djtarnt can be downloaded from ftp://ftp.gnu.org/gnu/windows/emacs/utilities/i386/. See the README file for information on the latest versions of this tools. As of October 2000, the latest version is djtarnt.exe Choose a folder to contain this utility and then use this link to download an executable version of djtarnt.

emacs

The web page for emacs for Windows can be found at http://www.gnu.org/software/emacs/windows/ntemacs.html or http://www.cs.washington.edu/homes/voelker/ntemacs.html. You want to download a pre-compiled version of emacs, from ftp://ftp.gnu.org/gnu/windows/emacs/latest/. This directory has a number of different versions of emacs you can download; you want the minimal precompiled distribution. The current version, as of October 2000, is emacs-20.7-bin-i386.tar.gz.

To install emacs, open a DOS window. Decide on a directory in which to place Emacs. Move the distribution (the emacs file you downloaded) to that directory, and then unpack it using the command djtarnt -x emacs-20.7-bin-i386.tar.gz. (If you downloaded a different version of emacs, substitute the name of the file you downloaded.) You may be prompted to rename or overwrite directories while this command is executing; hit return to continue, and ignore the messages. Once you have unpacked the distribution of Emacs, it should have the following subdirectories: bin   etc    info   lisp   lock    site-lisp. If your utility failed to create the lock directory, then you can simply create it by hand (it is initially empty).

Cygwin

"The Cygwin tools are ports of the popular GNU development tools and utilities for Windows 95, 98, and NT. They function by using the Cygwin library which provides a UNIX-like API on top of the Win32 API." (Cygwin home page, http://sources.redhat.com/cygwin/) Cygwin includes g++ and many unix shell tools, such as grep, diff, awk, sed, and many others. There are several ways to install Cygwin, but the easiest way is to download the setup program, and then let the setup program download and install Cygwin. Click on the "Install Cygwin NOW" icon on the Cygwin home page. This will download setup.exe. You can download setup.exe to any directory you choose.

Make sure you have Internet Explorer 5 installed before running setup.exe, or it will complain about not finding wininet.dll. Also, you should turn off your anti-virus software while running the setup program. You can download setup.exe, then scan it for viruses, then turn off your anti-virus software, and then run setup. Network Associates (formerly McAfee) anti-virus software can cause setup to hang. Other anti-virus software can report false positives in Cygwin files.

Create a directory to use during the Cygwin installation. When the installation is done you can delete this directory. The recommended directory is C:\cyginstall. Next, run setup.exe while you are still connected to the Internet. Setup will control the download and installation process for you. Setup will ask some questions during the installation process:

When the installation is done, you will have a desktop icon and a Start menu group for Cygnus Solutions, which has an item for the Cygwin bash shell. When you run Cygwin, it will open a DOS window which is running a version of bash, which is one of the Unix shells. This is the window where you can enter your favorite Unix commands, including g++. You are running as administrator, and are in the directory /home/administrator. Cygwin has its own directory tree, and it can also access files in Windows directories. You must use forward slashes ("/") in paths, even for Windows directories. Also, any Windows directory names or file names that contain spaces must be placed within quotes in Cygwin commands. For example, to list the files in the Windows directory C:\My Documents, use the command ls c:/'My Documents'. You can create subdirectories of the /home/administrator directory; such subdirectories would be a good place to keep your C++ programs.

Documentation on Cygwin can be found at http://sources.redhat.com/cygwin/docs.html. Instructions on installation using the setup program (and other interesting and helpful information) can be found in the Cygwin FAQ at http://sources.redhat.com/cygwin/faq/ There is a lot more to know about running Cygwin, which can be found in the documentation, but will not be covered here.



Email Me | Office Hours | My Home Page | Department Home | MCC Home Page

© Copyright Emmi Schatz 2001