Cygwin setup for an LTU Laptop

Why Cygwin? The laptop is a convenient tool on which to learn
the C language. The command line is the focus of most
textbooks on C, including the text for MCS 1142.
Unfortunately, most laptops run Windows and the Command Prompt
window in Windows is not a very good programmer's tool.
C++Builder and Visual Studio C++ are the two Windows C++
tool-sets often found at LTU. Both are large programs that are
made to ease the job of writing and revising large multi-part
programs. For Introduction to Programming in C, we will be
working on C on the command line, except for a one-week
digression to windowing and Web programming. The original
authors of C, advised that C is a small language and it is not
well served by a large book. Similarly, learning to write
small, straightforward, C programs is made unnecessarily
difficult by using an Integrated Development Environment like
Builder or Visual Studio that is optimized for large projects.

The default Base Cygwin package gives you the BASH shell to use
instead of the DOS emulation shell in the Windows Command
Prompt "black window." Just the command history that remembers
from session to session and the command completion features
will save you a lot of typing in the course of a semester.

The main reason, however, to set up Cygwin for MCS 1142 is that
Cygwin is the easiest way to get and use the gcc C compiler. You
can also use bcc32 from Builder or cl from Visual Studio at the
Command Prompt. gcc is the only one of the three that will
allow you to try your C on other platforms... perhaps a
PowerBook or a 68HC11 development board.

To get started in command line C

Create a folder for your class work under your own home folder.
On my machine that was
c:\Documents and Settings\jmmiller\mcs1142

You can use Notepad. Taking the time to install a real
programmer's editor with a spell-checker, Emacs would be a good idea at this
point.

Go to
www.cygwin.com and
simply click on any of the
Install Cygwin now links. If you select "Open" IE will save
Setup.exe to a temporary folder and run it... bringing up this
screen. In general, just accept the defaults. Some options

Select "Install from Internet"

Here you will want to accept C:\cygwin as the install directory
and probably make it available for "All Users" and for
MCS 1142 you want DOS style text files.

Here could use C:\cygwin or maybe a more Windows
like C:\My Documents\Downloads\cygwin

Select "Direct Connection"

I have had reasonable speed from ftp.sunsite.utk.edu or
ftp.lug.udel.edu Your mileage may vary.

At the screen
for selecting the packages to install, for now -- you
can easily install more later, just select the base package
and binutils, gcc:core and gcc:g++ from the Devel branch.
This requires that you expand the Devel branch and go down to the
gcc:g++ line and click on the word skip until it changes to
a number like 3.3.3-3 or install. Then click "Next".

the Icons are recommended. You can delete them later.

Now add
;c:\cygwin\bin;c:\Documents and Settings\your-id\mcs1142
to the the end of your Path Environment
variable (found by right-clicking on My Computer and selecting
the Advanced tab.) This will help Windows find the cygwin1.dll
if you run your newly compiled C program from the ordinary
command Prompt. The second part also helps Cygwin find your
freshly compiled C programs.