Red Antigua Logo
Yet another piece of web.
Search this site (by Google)
Tools    (top)
Check a site for broken links
(W3C)

Perl modules    (top)
Tree::Numbered::Tools
(CPAN)
Perl tutorials    (top)
Perl modules
HTML::Template
CGI::Application
Cookies with CGI::Application
Upload files with CGI::Application
Download files with CGI::Application
Redirect with CGI::Application
CPAN shell
Install DBD::mysql from the CPAN shell
Perl trim function
Validate an IP with Perl
Run suid Perl scripts under Apache
Perl taint mode
Perl date functions with Date::Calc

In Spanish
Curso de Perl

C tutorials    (top)
C - Introduction
C - Absolute beginner's Emacs
C - Examples for beginners
C - Makefile examples
C - Autotools examples
Server configurations    (top)
DNS
Apache
Apache Authentication and Access Control
mod_perl on FreeBSD
MySQL
MySQL add account
phpMyAdmin
Squid
DHCP

UNIX on Windows    (top)
MSYS2 - UNIX environment for MS Windows 32/64 bits
Apache setup on Windows
MySQL setup on Windows
PHP setup on Windows
Perl setup on Windows
Emacs setup on Windows
PuTTY
WinSCP
GIMP on Windows
MinGW - gcc on Windows
MSYS - UNIX-styled shell on Windows
msysDTK - autotools on Windows
GDB for MinGW on Windows

Misc. FreeBSD/UNIX    (top)
'portupgrade' on FreeBSD
'ipf' on FreeBSD
'pf' on FreeBSD
'su' on FreeBSD
Mount an ISO image under FreeBSD
Load the correct sound driver under FreeBSD without knowing what sound card you are using
Simultaneous sound channels on FreeBSD
FreeBSD network stuff
DOS-to-UNIX file conversion
favicon.ico on UNIX
Emacs tips
Command Line Calculator
Save multimedia streams with 'mplayer'
xargs - solution to 'Argument list too long'
Process multiple images from the command line using 'ImageMagick'
Turn the system bell off under X Windows
Process each line in an input file from the command line (or in a shell script)
How to keep a program running in the background using 'nohup'
How to remove symbolic links in the current directory using 'find' and 'rm'
How to remove Emacs backup files in the current directory and all subdirectories using 'find' and 'rm'
How to execute .profile without logging in
Configure X to handle non-English characters
How to move /var to /usr/var

Redirect a web page    (top)
Redirect to another web page
Apache redirect
C redirect
Perl redirect
PHP redirect
HTML redirect
JavaScript redirect

Javascript    (top)
Trim function
Login form
Register form
Popup window

MinGW - gcc on Windows
MinGW - gcc on Windows

This software is obsolete.
Use MSYS2 instead.

MinGW homepage: http://www.mingw.org/
Download: https://sourceforge.net/projects/mingw/files/

Install
Start the Installer as for any other Windows program.
Choose the default package (Current).
Choose "Minimal" install type if you want to install only gcc, choose "Custom" or "Full" if you want to install additional components such as g++ and/or MinGW make (you can always re-run the installer later to add these components).

Configure
MinGW is installed by default in the folder C:\MinGW. Add this path to the PATH Environment variable:
Start -> Control Panel -> System -> Advanced -> Environment Variables
In the System variables section, select the Path variable, clic Edit, and add
;C:\MinGW\bin
at the end (no spaces).

Note: If you already installed UnxUtils and added its path to PATH, you should better put ;C:\MinGW\bin before ;C:\unxutils\bin\, as some of the tools exists both in MinGW and UnxUtils, but where MinGW normally uses more recent versions.

Now open a Command Line window (if you already had a Command Line window opened, you have to close and open it again, as the PATH changes doesn't apply to already running applications).

Compile and run
Type gcc and you should see
gcc: no input files
Create a file simple.c:
/*
 * The simplest Windows program you will ever write.
 *
 * This source code is in the PUBLIC DOMAIN and has NO WARRANTY.
 *
 * Colin Peters <colinpeters at geocities.com>, June 9, 1998.
 */

#include <windows.h>

int STDCALL
WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
{
        MessageBox (NULL, "Hello, Windows!", "Hello", MB_OK);
        return 0;
}
Compile simple.c and run simple.exe in a Command Line window:
gcc -c -o simple.o simple.c
gcc -o simple.exe simple.o -mwindows
simple
You should see a window similar to this one:
MinGW - Hello Windows!

Additional tools
If you haven't done so already, you may install Emacs and/or UnxUtils to get a more UNIX-like development environment on your Windows box.

Read more
http://www.mingw.org - Home Page
http://www.mingw.org/wiki/HOWTO - Documentation
http://wiki.codeblocks.org/index.php?title=MinGW_installation - MinGW installation
http://mirrors.zoreil.com/webclub.kcom.ne.jp/ma/colinp/win32/hello.html - The Simplest Win32 Program You Will Ever See
http://www.spacejack.org/games/mingw/ - MinGW Starter Guide
http://www.spacejack.org/games/mingw/mingw-sdl.html - MinGW and SDL: Windows Development
http://www.spacejack.org/games/mingw/mingw-dx.html - MinGW + DirectX
http://www.willus.com/mingw/_all.shtml - Willus.com's MinGW/Gnu C Tips
Last modified: Wed Sep 7 12:16:36 EDT 2016