0

Is it even possible to build Google Crashpad into DLLs instead of static libraries? I have a cross-platform application I'm trying to integrate the crashpad to, however the build system of the crashpad is limited to its defaults, disallowing one to change a toolchain without tons of pain, thus I have to build it with MSVC and only static libs (the build configuration is unable to build DLLs correctly despite some modifications of BUILD.gn files with crashpad_loadable_module). My application is built using MinGW for Windows, so it is not an option to use .lib-files generated by MSVC, therefore I need to either build it to DLL or build with MinGW. I gave up trying to build it with MinGW as there thousands of errors and missing header files. And since I can't build it to DLL (there are errors during build some test tools or something) I realized that I can try to combine required .lib files into DLL with MSVC and afterwards to use it with MinGW, but seems like it is also not a solution as MSVC refuses to build statics libs into the dynamic one. Could you please advice me some ways to solve the problem? thanks in advance

G-Virus
  • 37
  • 8
  • 1
    Their public classes contain non-primitive data members from the standard library e.g. [wstring dump_path_;](https://github.com/wincent/Google-Breakpad/blob/7b873221e6741208827b2a4a5f2dda35ceccb474/src/client/windows/handler/exception_handler.h#L292) - so, if the implementation is different in different compilers, there will be memory corruption etc. – dewaffled Aug 27 '23 at 08:40
  • @dewaffled is it related to DLLs as well? I'm sure I've been using various DLLs never thinking of a compiler they were built with, but probably I did it wrong. Is that even possible to have the crashpad with mingw without needed to rebuild it with mingw? – G-Virus Aug 27 '23 at 23:08

1 Answers1

0

I found a fork of crashpad that is using CMake as a build system and has a patch for MinGW. After a couple of tweaks I have successfully built it as static libraries and now it generates dump-files very well. Not us but the crashpad devs should care of such things

G-Virus
  • 37
  • 8