Newbie to Mac, ObjC, Xcode, etc. Background more in Palm and other PDA programming using Visual Basic like languages.
I would like to simply write a Hello World app in C and compile it. I am not sure what tools are available.
I do have Smultron as a text editor. If I write the code in Smultron and save it as hello.c then I use Terminal and enter gcc -o Hello hello.c I get an error that is "return type of ‘main’ is not ‘int’"
I need suggestions for if the route that I am using is best to get a start in C on an Intel Mac and any other guidance that you offer.
Thanks,
Linda
I would like to simply write a Hello World app in C and compile it. I am not sure what tools are available.
I do have Smultron as a text editor. If I write the code in Smultron and save it as hello.c then I use Terminal and enter gcc -o Hello hello.c I get an error that is "return type of ‘main’ is not ‘int’"
Code:
#include <stdio.h>
void main()
{
printf("Hello, World\n");
}
I need suggestions for if the route that I am using is best to get a start in C on an Intel Mac and any other guidance that you offer.
Thanks,
Linda