2007-02-08

Cygwin, how kewl

It works..!

Installed Cygwin (have been using it for couple of years mainly because of the shell as a superior substitute for Windows cmd.exe but never actually compiled anything) on a new computer, and with it gcc and friends. Opened a shell and did:

$ cat >foo.c
#include <stdio.h>

int main( int argc, char **argv)
{
    printf( "Hello, world!\n");

    return 0;
}
(Ctrl-d)

$ gcc foo.c -o foo.exe -mno-cygwin

$ ./foo.exe
Hello, world!

The -mno-cygwin flag links againts native Windows libs so that there is no need for a Cygwin installation to be present in a computer that the program is being run on. Gdb worked fine too. How sw33t. Next step is to "port" a program that has been developed with Visual Studio.. should work ok I think.