Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 18, 2009, 12:22 PM   #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 12:30 PM.
Jayomat is offline   0 Reply With Quote
Old Mar 18, 2009, 01: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 02:34 PM. Reason: post merge; do not make consecutive posts; see forum rules
Howiieque is offline   0 Reply With Quote
Old Mar 18, 2009, 02: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

Similar Threads
thread Thread Starter Forum Replies Last Post
Xcode or cocoa? Pajamaxllama iPhone/iPad Programming 9 Oct 22, 2013 10:01 AM
XCode - Cocoa-applescript question djjasonsa Mac Programming 3 Feb 21, 2013 04:50 PM
Activity Monitor in Terminal Output macuser1232 MacBook Pro 2 Nov 22, 2012 11:47 PM
After updating XCode, output terminal problem iMacFarlane Mac Programming 9 Oct 4, 2012 12:29 AM

Forum Jump

All times are GMT -5. The time now is 12:10 AM.

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

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