using xcode and C newbee question

Discussion in 'Mac Programming' started by echo44, Aug 7, 2008.

  1. echo44 macrumors 6502

    Jan 21, 2008
    bougth the book learn c on the macintosh.
    first exercise is to run the "hello me"
    in xcode I select command line utlity as the template and than standard tool.
    I create the new project and the code shows up I than select "build and run"
    with "main.c" selected. I get a succeeded message but a window never opens that say"hello world" Shouldn't this print out in a seperate window somewhere?
    :confused: I am a newbee and want to learn C programming but am getting a little confused by the whole xcode thing.
    sorry if this is a really stupid question
  2. sord macrumors 6502

    Jun 16, 2004
    If you had done a search on the forum, you would see this question asked (and answered) quite a lot...

    Click Run -> Console
  3. lee1210 macrumors 68040


    Jan 10, 2005
    Dallas, TX
    Choose window -> tools -> run log.

    This should show you stdout from your program (and stderr, i believe).

    This is one of many reasons I recommend starting with a text editor, and gcc at the terminal. The basics are there, not hiding. Until you're building very large projects, building GUI apps with Interface Builder, etc. I don't think XCode is particularly helpful in learning the basics.

    As always, this is my opinion and others disagree... but I think knowing the basics make you more versatile and helps things "click" as you progress.


    Edit: Maybe Run -> Console is where to find it in a newer version, I'm in 2.3.
  4. echo44 thread starter macrumors 6502

    Jan 21, 2008
  5. divinemercy macrumors regular

    Jul 12, 2008
    I like using xCode as a newbie... I dunno. Maybe it's just the "feeling" of it you know? Like the color coding, and just the power that seems to dwell in it haha.

    Plus, if you're willing to put in a bit more work in the beginning by using xCode, i'm guessing that it'll save lots of time and frustration later on since you're already used to the layout, etc of this great tool.



Share This Page