Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 18, 2009, 11:22 AM   #1
Jayomat
macrumors 6502a
 
Jayomat's Avatar
 
Join Date: Jan 2009
Cocoa App / XCode - no terminal output?!

Hi all,
im a newb with some java experience, playing around with the xcode. however, i just installed xcode and startet a new "cocoa application" projekt (macosx). i opened "Other Sources" => "main.m" and replaced the code in there with these lines:

Quote:
#import <stdio.h>

int main(int argc, char *argv[])
{
int sum;

sum = 50 + 25;
printf ("The sum of 50 + 25 is %i", sum);
return 0;
}
when i hit "build and go", shouldnt that print the line "The sum of 50 + 25 is 75" on terminal ??? i dont understand why it doesnt work. can someone help me out?

thanks a lot!

Last edited by Jayomat; Mar 18, 2009 at 11:30 AM.
Jayomat is offline   0 Reply With Quote
Old Mar 18, 2009, 12:00 PM   #2
Howiieque
macrumors regular
 
Join Date: Feb 2009
the output display on the console. after build and go. Press command+option+r, you will see the result.

then check out the project folder, in the debug, you will find your app. run it. that goes to the terminal.

By the way, if you just want a command line thing, create a command line utility-->foundation tool.

Last edited by Doctor Q; Mar 18, 2009 at 01:34 PM. Reason: post merge; do not make consecutive posts; see forum rules
Howiieque is offline   0 Reply With Quote
Old Mar 18, 2009, 01:27 PM   #3
Jayomat
Thread Starter
macrumors 6502a
 
Jayomat's Avatar
 
Join Date: Jan 2009
Quote:
Originally Posted by Howiieque View Post
By the way, if you just want a command line thing, create a command line utility-->foundation tool.
that's what i was looking for. as is said, newb gotta check it out.thx
Jayomat is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Mac App Store Down? No credit card processing ... DocNYz Mac Applications and Mac App Store 3 Apr 26, 2012 04:24 AM
LOGITECH X-530 5.1 Speaker System - no sound + (look for full info) polo3400 iMac 8 Dec 25, 2010 12:15 PM
Fast App Switching - No Landscape cidf2008 iPhone 0 Jun 9, 2010 06:07 AM
App store - No 'Update All' ??? profetto iPhone 3 Aug 24, 2008 08:37 AM
ipod touch - no music output to headphones twoodcc iPod touch Accessories 3 Dec 28, 2007 06:02 AM


All times are GMT -5. The time now is 08:17 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC