Search code examples
mingwmingw-w64

How to generate debug symbols when building using mingw64


I'm using mingw64 (gcc 10.x) to build a few libraries (libgsf and its dependencies). What should be set so the build will also generate debug symbols? The compilation cmd is

MINGW_INSTALLS=mingw64 makepkg-mingw -sLf

Solution

  • To generate debug symbols you need to pass the -g flag to gcc org g++.