5

In the release notes for GCC12, under the section "Runtime Library (libstdc++)", it says:

Improved experimental C++23 support, including: [...] <stacktrace> (not built by default, requires linking to an extra library).

What library do I need to link against to use <stacktrace>? I'm on an x86 Linux system, if that matters.

Barry
  • 286,269
  • 29
  • 621
  • 977
Irgendwhy
  • 125
  • 7

1 Answers1

9

You need to link with -lstdc++_libbacktrace (as now documented here).

In order for this to work, gcc needs to have been configured with --enable-libstdcxx-backtrace.

Barry
  • 286,269
  • 29
  • 621
  • 977