c++windowsboostmingw-w64boost-stacktrace

Using BOOST_STACKTRACE_USE_BACKTRACE on Windows with MinGW64


I am building a Qt application using Windows and MinGW64. I need to use Boost Stacktrace to generate stack traces like the Linux build of the application already does.

The corresponding switch BOOST_STACKTRACE_USE_BACKTRACE (as described in https://www.boost.org/doc/libs/1_65_1/doc/html/stacktrace/configuration_and_build.html) is set and everything works fine on Linux.

However on Windows the libbacktrace library is missing. The above boost page contains two links to the sources of libbacktrace but I couldn't find a prebuilt binary for Windows/MinGW nor could I find any build instructions or usage documentation for my environment.

How can I use BOOST_STACKTRACE_USE_BACKTRACE with Windows/MinGW64?


Solution

  • I solved this problem (and some more issues) by switching to MSYS2 UCRT. MSYS2 provides a precompiled libbacktrace package.