View Full Version : How to compile/run/ the works
slooksterPSV
Oct 17, 2004, 12:49 AM
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
Oct 17, 2004, 03:17 AM
This is about as simple as it can get from the command line:
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$
slooksterPSV
Oct 17, 2004, 11:03 AM
That one piece of code made it all work the:
cc -o test_1 test_1.c
that did it. It all works now, thank you so much
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.