问题描述
Crashpad 是 C++ 应用程序的错误报告系统.https://chromium.googlesource.com/crashpad/crashpad/+/HEAD/doc/developing.md
Crashpad is an error reporting system for c++ apps.https://chromium.googlesource.com/crashpad/crashpad/+/HEAD/doc/developing.md
构建说明是
$ cd ~/crashpad/crashpad
$ gn gen out/Default
$ ninja -C out/Default
我可以构建预定义的静态库,但我还没有找到如何使用 gn
或 ninja
来生成共享库的方法.
I can build predefined static libs but I have not found a way how to use gn
or ninja
to generate the shared libraries.
推荐答案
生成ninja文件后,为每个ninja文件找到开关/MTd(调试)或/MT(发布版本)并将其更改为/MDd或/MD 所以动态库会被创建
after you generate ninja files, for each ninja file find the switch /MTd (debug) or /MT (release version) and change it to /MDd or /MD so the dynamic libs will be created
然后您可以使用 ninja 构建 crashpad,输出仍然是 lib 文件,因此当您将它们链接到项目时它们将包含在 exe 文件中(您不必像使用 dll 一样将它们添加到项目中).
then you can build crashpad with ninja, the output is still lib files so they will be included in the exe file when you link them to your project (you do not have to add them to your project as using dlls).
这篇关于如何构建 crashpad 的动态(共享)库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!