开发者

using printf in C callback function in Objective-C

开发者 https://www.devze.com 2023-03-30 01:50 出处:网络
I have an Xcode4 (OSX 10.6.7)app using USB and therefore including C callback functions that are defined outside the @implementation context. That works well, but I cannot see the output I inserted wi

I have an Xcode4 (OSX 10.6.7)app using USB and therefore including C callback functions that are defined outside the @implementation context. That works well, but I cannot see the output I inserted with printf in the callback function to control the behaviour. It is not shown in the debugger console nor in the console of the system. Inside my objective-C functions, where I normally use NSLog, printf works fine and shows up in the debu开发者_StackOverflow中文版gger console. I also tried to use fflush after the call as I read in the lists, but with no effect.


try using

fprintf( stderr, "",..._

instead

0

精彩评论

暂无评论...
验证码 换一张
取 消