This page is basically a mirror of the MAME development tools page. MAME and MESS are usually compiled using the free GCC compiler. Currently we are using version 4.2.1, included with the MinGW development environment.
You can either get the various tools yourself from the MinGW download page, or use the package below that Aaron Giles put together.
Create a directory for the tools, usually this will be simply called mingw.
Extract the file mingw-mame-20070810.exe into your mingw directory. This contains the compiler, various tools, libraries and standard include files.
You also need DirectX headers, which are not included in the above package. Download dx80_mgw.zip and extract the following files into your mingw/include directory:
All that is left is to add the compiler to your path, either in your global %PATH% environment variable, or local each time you want to compile.
set path=%PATH%;mingw\bin