• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
where are the results of calls to printf, fprintf shown?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

where are the results of calls to printf, fprintf shown?


  • Subject: where are the results of calls to printf, fprintf shown?
  • From: Boyd Collier <email@hidden>
  • Date: Wed, 28 Dec 2011 11:52:18 -0800

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

  • Follow-Ups:
    • Re: where are the results of calls to printf, fprintf shown?
      • From: Joar Wingfors <email@hidden>
    • Re: where are the results of calls to printf, fprintf shown?
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Why is the ARC converter marking properties as weak?
  • Next by Date: Re: where are the results of calls to printf, fprintf shown?
  • Previous by thread: Why is the ARC converter marking properties as weak?
  • Next by thread: Re: where are the results of calls to printf, fprintf shown?
  • Index(es):
    • Date
    • Thread