fprintf(stderr, "blah blah"); /*doesn't seem to want to work*/
Hi,
I'm in Yosemite 10.10 and have code that is using Objective C++. In the .m files the NSLog calls work fine. my output ends up in system.log. However that code calls functions in .c files. In the .c files I never see any output to console (if I invoke the program from the command line) or in the system.log. I even tried using freopen and assigned the stderr to a file but didn't get anything stored to a file.
In the .c files I do the normal stuff like
fprintf(stderr,"hey I'm here at this line\n");
nothing fancy
I was originally using plain old printf("blah blah\n"); but that wasn't working as well.
So my question: Is there a problem with going from Objective C++ to c in terms of doing I/O with console or other forms of simple I/O ?
When I resume control back in the .m file (function), the NSLog() calls work again with no problems. Messages appear in system.log.
thanks in advance. This is my first post so bear with me.
Gordo
Mac Pro, OS X Yosemite (10.10.1)