GHCi linker (which is used by TH) cannot load some C++ code dynamically for some reason. It's unclear whether these GHC tickets are really fixed: GHC 3242, GHC 10726.
Workaround:
- Put list of unresolved externals into all.def (add others if needed):
EXPORTS
__mingw_vsprintf