The Discord SDK v3.2.1 does not build with MinGW. Luckily, it is pretty easy to fix. Please apply the following patch for the next release: https://github.com/diasurgical/devilutionX/blob/ed02eb58d4c719a4dc1a2ed2f155335f325b5c0e/3rdParty/discord/fixes.patch