本文介绍了如何建立动态(共用)的rashpad库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Crashpad是c ++应用程序的错误报告系统. https://chromium.googlesource.com/crashpad/crashpad/+/HEAD/doc/developing.md

构建说明是

 $ cd ~/crashpad/crashpad
 $ gn gen out/Default
 $ ninja -C out/Default

我可以构建预定义的静态库,但是我还没有找到一种方法来使用gnninja生成共享库.

解决方案

生成忍者文件后,对于每个忍者文件,请找到开关/MTd(调试)或/MT(发行版)并将其更改为/MDd或/MD,因此将创建动态库

然后,您可以使用忍者构建崩溃垫,输出仍然是lib文件,因此当您将它们链接到项目时,它们将包含在exe文件中(您不必像使用dll一样将它们添加到您的项目中)./p>

Crashpad is an error reporting system for c++ apps.https://chromium.googlesource.com/crashpad/crashpad/+/HEAD/doc/developing.md

build instructions are

 $ cd ~/crashpad/crashpad
 $ gn gen out/Default
 $ ninja -C out/Default

I can build predefined static libs but I have not found a way how to use gn or ninja to generate the shared libraries.

解决方案

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

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).

这篇关于如何建立动态(共用)的rashpad库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 18:32