c - iOS - 在 plCrashReporter 中使用 PRIx64 打印内存地址

标签 c ios ios4 macros crash-reports

我正在尝试使用此处找到的代码将 plCrashReporter 包含在我的 iPhone 应用程序中:

http://plcrashreporter.googlecode.com/svn/tags/plcrashreporter-1.0/Documentation/API/example_usage_iphone.html

我的一个问题出现在这一行:

 NSLog(@"Crashed with signal %@ (code %@, address=0x%" PRIx64 ")", report.signalInfo.name,
       report.signalInfo.code, report.signalInfo.address);

错误:

error: expected `)' before 'PRIx64'

我试着四处搜索,但找不到任何关于此的内容。想法? report.signalInfo.address 是一个 64 位无符号整数,那么他们为什么不直接使用 %u?

谢谢!

最佳答案

PRIx64 是“X”的宏。

关于c - iOS - 在 plCrashReporter 中使用 PRIx64 打印内存地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4393962/

相关文章:

ios - swift - viewDidAppear 不会触发

ios - UIView center 属性给出了意想不到的结果

iphone - 以编程方式更改基于 UIWebkit 的应用程序的方向

iphone - 在 Xcode 中,我是否在 build 或 version 下输入应用程序的版本号

c - 错误 : unsequenced modification and access to <argument>

c++ - 在函数返回后释放动态分配的结构数组。

c - GCC/C 如何隐藏控制台窗口?

c - 没有进程区域设置的 Gettext

ios - 使用未解析的标识符 'JSONEncoder' swift4

iphone - 如何为我的 View 添加动画效果?