Question:
gcc as a command in terminal?
William
2012-08-30 03:13:47 UTC
i'm using a mac to learn c programming. i was taught to compile a code by typing something like this into the command line:

gcc -std=c99 -Wall -pedantic -Werror -o rot rot.c

but for some reason now it keeps saying that the command gcc is not recognised. i know its a bit vague but can anyone point me in the right direction a least?

thanks
Five answers:
Paul
2012-08-30 08:04:44 UTC
Did this happen after you updated your OS?



On Mac, you install GCC via Xcode. Download Xcode from the app store. Then go

Xcode->Preferences

In the downloads tab, install "Command Line Tools".



Might have to restart after it is finished. You should be able to run gcc in command line now.
?
2012-08-30 03:17:56 UTC
Do checkup whether gcc is installed or not. The error message indicates either gcc is not installed or PATH problem.

Do set PATH to the directory where gcc executable file is located and then try
?
2017-02-20 17:20:57 UTC
you will get carry of a compiler it incredibly is termed "Cygwin" it extremely is loose and lunix base. whilst u get carry of u can serch a thank you to configurate to collect c. then u can collect ur ".c" application utilising gcc see you later.c -o see you later. gcc ---->to collect see you later.c ---> the call of ur document -o ---> to call ur .exe document see you later----> the call of ur ".exe" document
Psychic Computer RepairĀ® PEBKAC?
2012-08-30 03:20:44 UTC
http://cboard.cprogramming.com/linux-programming/106557-gcc-mac-terminal.html

~
?
2012-08-30 11:02:51 UTC
once check in environment or path ..


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...