If your program is C++, you'll probably want to use one of these commands: clang++ -o program program. Note: On newer versions of OS X, you would use clang instead of gcc, like this: clang program.c -o program Here you can type in your C program Type in Ctrl + X. Then you can compile your code with by simply running gcc as in the next line without having to fire up the big, ugly software development GUI called Xcode: gcc -Wall -o program program.c Open the terminal Type in the terminal: nano which is a text editor available for the terminal. Now install the command-line tools like this: xcode-select -install How can you start Terminal? You need to do another "Spotlight Search", which means you type ⌘ Space and start typing Terminal and hit Enter when it guesses Terminal. Then you need to install the command-line tools in Terminal. How can you find App Store? Do a "Spotlight Search" by typing ⌘ Space and start typing App Store and hit Enter when it guesses correctly. Now you need the compiler, so you need to go to App Store and install Xcode which is Apple's compiler and development tools.
0 Comments
Leave a Reply. |