Dumb question... How to compile C in Xcode?

Discussion in 'Mac Programming' started by Dabisu, Oct 22, 2007.

  1. Dabisu macrumors member

    Joined:
    Jun 8, 2006
    #1
    I've been doing my work through bootcamp for my C programming class with Bloodshed and it's working great. I want to do some programming while in my OS X environment, but I can't compile my .c file that I open with X Code. Do I have to do it through a project or something? I've tried searching on google and the forums and searching through all the options in X cod. I'm just working on simple programs with only a .c file, nothing else.

    What should I be doing?
     
  2. toddburch macrumors 6502a

    Joined:
    Dec 4, 2006
    Location:
    Katy, Texas
    #2
    Yes, you have to create a New Project. After you do that, just copy your code over into main.c.

    Todd
     
  3. Dabisu thread starter macrumors member

    Joined:
    Jun 8, 2006
    #3
    I tried creating an empty project and then copying the code into main.c and it's still not working. I tried to compile, but everything is still grayed out.

    Is there a specific project type I need to make?
     
  4. toddburch macrumors 6502a

    Joined:
    Dec 4, 2006
    Location:
    Katy, Texas
    #4
    Pick Command Line Utility > Standard Tool.

    Todd
     

Share This Page