Wednesday, October 1, 2008

Compile Objective C With MinGW

Objective C is a special dialect of C that allows you to code for the Mac OS X and the iPhone.

It's very interesting to know that MinGW contains the GCC compiler that can compile Objective C code.

Using MinGW with MSYS I got to compile and run the following sample Hello World program saved as Hello.m:

#import <stdio.h>

int main( int argc, const char *argv[] )
{
printf( "hello world\n" );
return 0;
}

All that you do is open MSYS and run the GCC compiler.

No comments: