![]() ![]() ![]() 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. ![]() All your pathing is dependent on your current directory and where you want your files to go based on where you are - business as usual as far as that goes. Then you need to install the command-line tools in Terminal. because right now, I cant compile using gcc I guess because xcode isnt installed on my mac If you install Xcode, yes, you will be able to use gcc from the 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. 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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |