![]() 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 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 Now install the command-line tools like this: xcode-select -install ![]() How to 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 to find App Store? Do a "Spotlight Search" by typing ⌘ Space and start typing App Store and hit Enter when it guesses correctly. If you want an additional guide on all of the following steps (except for installing GCC), the one by Moncef Belyamani is quite helpful. We'll be installing GCC 4.8.1 and GDB through a tool called Homebrew. ![]() Now you need the compiler, so you need to go to App Store and install Xcode which is Apple's compiler and development tools. This section is intended to get you quickly started with C++ programming on your Mac.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |