Kent Landfield[SMTP:kent@landfield.com] sez: >As I know very little about cygwin other than where to get it... >Could someone write up a bulleted "how-to" such as... > > Getting cigwin32: > Installing cigwin32: > Unpacking hypermail: > Building Hypermail: > - run configure > - Compile hypermail > - If it does not compile > Installing hypermail: > Concerns running hypermail on a win32 system: > >This would be VERY helpful to a large section of the community. I'll give it a start. Getting cygwin: * Go to http://sourceware.cygnus.com/cygwin/ (I'll call this the "cygwin home"). * Click "Download Sites" in the box on the left. * Choose a download site close to you. * When you click on a link on that page, you'll always be taken to a directory. Click on "latest" to go to the directory containing the latest release. * There are several packages there. I recommend getting "full.exe". This is the package that has everything (compiler, shell tools, etc.) Installing cygwin * While you *could* simply double click on full.exe, I recommend that you read the documentation first. * Go to the Cygwin home and click "Documentation" in the box on the left. Then click on Cygwin User's Guide. * Read the documentation. The more you read, the happier you'll be. * Double click on full.exe and install cygwin. * In the current version, you need to do a few things with the shortcut that's created in C:\Windows\Start Menu\Programs\Cygnus Solutions before you can fire up the shell. Using Windows Explorer, go to that folder and right mouse on Cygwin B20. Select "Properties". You'll probably want to make the following changes: * On the "Program" tab, check "Close on exit" * On the "Memory" tab set "Initial Environment" to some high number (e.g., 4096). This avoids a bug in Windows' DOS shell where auto allocating memory fails. * On the "Misc" tab, uncheck "Fast Pasting". This will let you use copy and paste to paste text into the bash shell. * On the "Screen" tab, select Initial size: 50 lines. This will give you as big a window as you can get. * On the "Font" tab, select TT 8 x 16 to start with. This gives you full-sized characters for the window. * Double-click on Cygwin B20 or use the Start menu to bring up the shell. * You'll get a warning message that bash can't find the /tmp directory. Fix that by typing: mkdir /tmp /bin /usr /etc This is in the instructions you should have read. * Using Explorer, go to C:\cygnus\cygwin-b20\H-i586-cygwin32\bin folder. Find the file "sh.exe". Right-mouse on the icon for the file and select "create shortcut". Cut the shortcut out of that folder and paste it into the C:\bin folder. This is also in the instructions you should have read. * NOTE: if you don't like the idea of creating all those directories in the C: root, you absolutely can use links and mount to put them somewhere else. On my system at home, I've got /usr/bin pointed to the Cygnus bin directory and /usr/local pointed somewhere entirely different. This falls under advanced customization, and I don't recommend it unless you have a lot of time to play around with the mount command, which is somewhat different in cygwin (both from Unix and often from their own documentation). * To exit from bash type exit You should *not* just exit from the window. Testing the Installation: * Create a "hello.c" file somewhere. You know what you need to type in that file. * In your bash shell, go to the folder where you've put hello.c (use cd) and type: gcc hello.c * When the code compiles and links successfully (you can read what it's doing on the caption of the bash window), type ./a.exe and you should get the familiar "Hello, world!". * Create another file called "hello.cpp". You know what you need to type in that file. Incidentally, you may #include or * Type in g++ -o hello hello.cpp * Execute hello.exe: ./hello * If you haven't got Quick View installed on your system, do the following: * Open the control panel * Select Add/Remove Programs * Go to the Windows Setup tab * Select Accessories, and press the "Details..." button * Look for Quick View, check it, and insert your Windows 9X CD-ROM when prompted. * In exporer, right mouse on a.exe and select Quick View. Notice that the executable requires cygwin1.dll. Do the same for hello.exe. * Recompile the first file, "hello.c", as follows: gcc -mno-cygwin hello.c * Now use Quick View and notice that the executable requires crtdll.dll and kernel32.dll, but not cygwin1.dll. * Now recompile the second file, "hello.cpp", the same way: g++ -mno-cygwin -o hello hello.cpp Disaster! A huge number of error messages. To solve it, go out and get ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/egcs-1.1.2/egcs-1.1.2-mingw-extra.tar.gz and extract it to: C:\usr\mingw32 In this tarball, libm.a seems to be a soft link which got copied by mistake into the distribution. Either extract everything but libm.a or extract everything and delete it from C:\usr\mingw32\lib Now try again, using the following command line arguments: g++ -mno-cygwin -I/usr/mingw32/include -L/usr/mingw32/lib hello.cpp This time it should link and run correctly. The whole issue is explained in: http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ -- click on the article "-mno-cygwin" * Now test gcc on a Windows program. Copy the following file http://www.geocities.com/Tokyo/Towers/6162/win32/simple.txt to the directory you're working in and rename it to simple.c * Compile it as follows: gcc -mwindows simple.c or gcc -mno-cygwin -mwindows simple.c * Execute it from your shell: ./a.exe * If you compiled it -mno-cygwin, you can execute it from Explorer by double-clicking on the icon. If you compiled it without that option, you'll need to make a copy of cygwin1.dll somewhere in your executable path before you can execute it by double-clicking on the icon. * A somewhat more complex Win32 program is at http://www.geocities.com/Tokyo/Towers/6162/win32/test.txt Rename it to test.c and compile as you did simple.c