1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

How to compile/run/ the works

Discussion in 'Mac Programming' started by slooksterPSV, Oct 16, 2004.

  1. macrumors 68030


    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.
  2. macrumors G3


    This is about as simple as it can get from the command line:

    Meowcintosh:~ imeowbot$ cat meow.c
    #include <stdio.h>
        return 0;
    Meowcintosh:~ imeowbot$ cc -o meow meow.c 
    Meowcintosh:~ imeowbot$ ./meow
    Meowcintosh:~ imeowbot$
  3. macrumors 68030


    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

Share This Page