You can download and install MinGW from here:
http://sourceforge.net/project/showfile ... _id=595197
Select the EXE setup.
Once installed on your computer, go to c:\MinGW\bin\
Create a file test.c with these contents:
test.c
- Code: Select all Expand view
#include <windows.h>
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
MessageBox( 0, "Hello World", "From MingW", MB_ICONINFORMATION );
return 0;
}
To build it, simply do:
gcc -otest.exe -mwindows test.c
Then you get test.exe, which it is a very small and self contained EXE. You can download the test.c file and the test.exe from here:
http://rapidshare.com/files/146133212/test.zip.html