How to install the GCC compiler for Macintosh programming on a Macintosh Air.
This simple command will install the GCC compiler collection and the make command on a Macintosh. This enables programming console apps on a Macintosh machine. These instructions are for Macintosh OSX Sierra. May not be the same on an older Macintosh machine. But give it a try anyway. Either this or the Software Center.
Johns-MacBook-Air:Documents jason$ sudo xcode-select --install |
Then write a simple c program.
#include <stdio.h> #include <stdlib.h> #define hi "Mr Anderson" int main(void) { printf("Hello %s\n\n",hi); return 0; } |
And then compile it with GCC.
Johns-MacBook-Air:Documents jason$ gcc intro.c -Wall -o intro |
And we are programming on a Macintosh in no time.
Johns-MacBook-Air:Documents jason$ ./intro Hello Mr Anderson |
This is how easy it is to install the GCC compiler collection on a Mac.
To get a nice VIM programming environment, use this .vimrc file I created. This will make the code colorful and make the editor more fun to use.
http://securitronlinux.com/uncategorized/my-nice-vimrc-file/.