在Mac OS X上构建Google Breakpad [英] Building Google Breakpad on Mac OS X

查看:1752
本文介绍了在Mac OS X上构建Google Breakpad的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为Mac OS X创建 Google Breakpad ,作为移植应用程序的一部分

I am attempting to build Google Breakpad for Mac OS X as a part of porting an application, based on the trunk revision 782.

Breakpad wiki 指定应构建client / mac / Breakpad.xcodeproj,如果我正确理解,它会生成一个包含动态链接库的Breakpad.framework。还有一个关于如何使用Objective-C应用程序的示例代码,但所有这些似乎与在其他平台上做事的正常方式非常不同,包括使用plist和其他不是部分的东西的我的应用程序。

The Breakpad wiki specifies that one should build client/mac/Breakpad.xcodeproj, which produces a Breakpad.framework including a dynamically linked lib if I understand correctly. There is also sample code on how to use this from an Objective-C application, but all this seem very different from what seems to be the normal way of doing things on other platforms, including the use of plists and other things that are not part of my application. I would much rather do things as similar as possible across platforms.

例如,似乎是Firefox使用Breakpad的方式:

For instance, this appears to be the way that Firefox uses Breakpad:

// include exception_handler.h from client/<platform>/handler,
// using ... here for brevity
#include "... exception_handler.h"
...
gExceptionHandler = new google_breakpad::
    ExceptionHandler(tempPath.get(),
                     nsnull,
                     MinidumpCallback,
                     nsnull,
#if defined(XP_WIN32)
                     google_breakpad::ExceptionHandler::HANDLER_ALL);
#else
                     true);
#endif



在我的项目中,我们做同样的事情, code> exception_handler.lib 。看来在Linux上,Breakpad生成一个相应的 libbreakpad_client.a ,可以以相同的方式链接,但不能在Mac OS X上链接。如果我

In my project, we are doing the same thing and just link against exception_handler.lib on Windows. It seems that on Linux, Breakpad generates a corresponding libbreakpad_client.a that can be linked against in the same way, but not on Mac OS X. If I do

./configure
make

从breakpad根目录生成一个 libbreakpad.a ,它不包含异常处理程序,而libbreakpad_client.a应该没有被构建。我可能很好地误解了关于使用Breakpad的正常方式以及在Mac上构建外部库的正常过程的任何事情,所以任何帮助是赞赏。

from the breakpad root directory a libbreakpad.a is generated that does not contain the exception handler, and the libbreakpad_client.a that should is not being built. I may very well have misunderstood just about anything on both the normal way of using Breakpad as well as the normal procedure for building external libraries on the Mac, so any help is appreciated.

如何在Mac OS X上创建 libbreakpad_client.a ?

How do I build libbreakpad_client.a on Mac OS X?

推荐答案

不幸的是,Breakpad源中没有解决方案。 XCode项目只是构建了Breakpad框架,因为这是更支持的客户端API。你可以用你自己的Makefile或者你想要的任何构建设置来构建代码,就像Firefox通过查看Mozilla makefiles集一样:

There is no solution in the Breakpad source for this, unfortunately. The XCode projects simply build the Breakpad framework, as that's the more-supported client API. You can build the code with your own set of Makefiles or whatever build setup you desire the same way Firefox does by looking at the set of Mozilla makefiles:

http://mxr.mozilla.org/mozilla -central / source / toolkit / crashreporter / google-breakpad / src / common / Makefile.in

http://mxr.mozilla.org/mozilla-central/source/ toolskit / crashreporter / google-breakpad / src / common / mac / Makefile.in

http://mxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/google -breakpad / src / client / Makefile.in

http://mxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/google-breakpad/ src / client / mac / handler / Makefile.in

http://mxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/google-breakpad /src/client/mac/crash_generation/Makefile.in

并收集CSRCS / CPPSRCS / CMSRCS / CMMSRCS中引用的文件集,并构建所有

and gathering the set of files referenced in CSRCS/CPPSRCS/CMSRCS/CMMSRCS, and building all of those.

您也可以在 Breakpad问题跟踪器,要求XCode项目也构建此静态库。这不会是一个困难的补丁。

You might also file a bug in the Breakpad issue tracker to ask that the XCode project build this static library as well. It would not be a difficult patch.

这篇关于在Mac OS X上构建Google Breakpad的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆