Functions not exported under MSYS2's clang
$ strings /ucrt64/lib/libpulse.dll.a | grep strerror
pa_strerror
__imp_pa_strerror
pa_strerror
pa_strerror
__imp_pa_strerror
Mangix@DESKTOP-VIRSTQA CLANG32 ~
$ strings /clang32/lib/libpulse.dll.a | grep strerror
Mangix@DESKTOP-VIRSTQA CLANG32 ~
$ strings /clang64/lib/libpulse.dll.a | grep strerror
The issue is that LLVM's lld does not support the map-file resulting in missing functions.
Now you might be thinking that a def file generated from the map-file would be a solution. Unfortunately because of a meson bug, that's not a solution: https://github.com/mesonbuild/meson/issues/10782
AFAIK the only way to properly fix this is to add EXPORT macros to the code and use dllexport or attribute((visibility("default")))