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

slooksterPSV

macrumors 68040
Original poster
Apr 17, 2004
3,544
306
Nowheresville
Ok so I just got GCC and those tools installed from the 302.3 MB download from Apple for the Developers tools. Now I'm having a problem. I can compile the programs using GCC, but when I run them nothing appears. Ok will someone give me a example C/C++ code and the commands to use at terminal and how to run the program and what appears after I run it. I'm expecting to see even Hello World, but nothing appears in the terminal.
 

iMeowbot

macrumors G3
Aug 30, 2003
8,634
0
This is about as simple as it can get from the command line:

Code:
Meowcintosh:~ imeowbot$ cat meow.c
#include <stdio.h>
int
main()
{
    printf("Meow!\n");
    return 0;
}
Meowcintosh:~ imeowbot$ cc -o meow meow.c 
Meowcintosh:~ imeowbot$ ./meow
Meow!
Meowcintosh:~ imeowbot$
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.