Compiling Google Crashpad as a DLL on Windows

112 Views Asked by At

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

1

There are 1 best solutions below

0
On

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