Discussion in 'Mac Programming' started by mpenderg, Jul 15, 2006.

  1. mpenderg macrumors newbie

    May 26, 2005
    Im trying to write a simple program using pico, I remember how to write in C Syntax ect but for the life of me cant remember how to compile. i have tryed gcc -o filename.c filename . i remember theres some thing else tho.. its been about 10 years sense i have done anything. any help?? www with code. i can still get around in the terminal box good just cant remember how to compile and run. Im usin powermac g5 i bought about 6 months ago..

  2. HiRez macrumors 603


    Jan 6, 2004
    Western US
    gcc mysourcefile.c -o myapp

    then to run (assuming you are IN the directory where your source file is):

    ./myapp (runs it in the same window) or open myapp (will run it in a separate window)

Share This Page