Package mingw-w64-x86_64-libgcrypt depends on package mingw-w64-x86_64-libgpg-error, which installs its dll to /mingw64/bin/libgpg-error-0.dll:
pacman -Ql mingw-w64-x86_64-libgpg-error
However the library installed by package mingw-w64-x86_64-libgcrypt (to /mingw64/bin/libgcrypt-20.dll) links to libgpg-error6-0.dll:
objdump -x /mingw64/bin/libgcrypt-20.dll | grep DLL
vma: Hint Time Forward DLL First
DLL Name: ADVAPI32.dll
DLL Name: KERNEL32.dll
DLL Name: msvcrt.dll
DLL Name: USER32.dll
DLL Name: libgpg-error6-0.dll
I ran into issues loading a library that depended on libgcrypt with an error of the following structure:
error while loading shared libraries: ?: cannot open shared object file: No such file or directory (the ? was actually present in the output)
but strace on the executable showed that the error was in fact the misnamed libgpg-error-0.dll
On my system, this was resolved easily by copying libgpg-error6-0.dll to libgpg-error-0.dll in /mingw64/bin/.
If there is any more information you need please let me know.