Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

shakeman0

macrumors 6502a
Original poster
Jul 20, 2009
632
22
Hello everyone,

I think I have finally wrapped my mind around the fact that Terminal works as a compiler. I'm trying to learn C and have no idea what command line to put into Terminal to get it to compile the code. Could someone tell me the command line?


Thanks,
 
I think I have finally wrapped my mind around the fact that Terminal works as a compiler.

Hi,
just a little precision. It´s not Terminal who works as a compiler. Terminal is just used to execute a compiler which is for example gcc. As said previously, you should read the manual or just google for the different options of gcc. The basic command to compile one source file is

Code:
gcc hello.c -o hello


Tex
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.