Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

echo44

macrumors 6502
Original poster
Jan 21, 2008
373
147
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
 

sord

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

Click Run -> Console
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
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.

-Lee

Edit: Maybe Run -> Console is where to find it in a newer version, I'm in 2.3.
 

divinemercy

macrumors regular
Jul 12, 2008
147
2
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.

peace,

ryan
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.