Re: where are the results of calls to printf, fprintf shown?
Re: where are the results of calls to printf, fprintf shown?
- Subject: Re: where are the results of calls to printf, fprintf shown?
- From: Joar Wingfors <email@hidden>
- Date: Wed, 28 Dec 2011 20:24:02 -0800
Hi Boyd,
The code that you provided works just fine on my machine (I get output from all three calls in the console). I'm also using Mac OS X 10.7.2 and Xcode 4.2.1.
Joar
On 28 dec 2011, at 11:52, Boyd Collier wrote:
> How does one use printf and its friends in Xcode 4.2?
>
> Here is just about the simplest code I could come up with to experiment with these functions:
>
> #import <Cocoa/Cocoa.h>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(int argc, char *argv[])
> {
>
> printf("%d \n", 345);
> fprintf(stdout, "%d \n", 345);
> fflush( stdout );
>
> NSLog(@"This is from NSLog %d", 789);
> return NSApplicationMain(argc, (const char **)argv);
> }
>
>
> The result of the call to NSLog shows up in the Console window, but nothing is shown there for calls to printf or fprintf or anything else in the various permutations that I could think of from this suite of functions.
>
> Boyd
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden