I have trouble getting mingw-w64-gpgme to work. The gpgme library is
different from most C libraries because it is not a standalone
library. Instead it calls out to gnupg executables at runtime. And
that is where the problem comes in.

I was able to compile my application and link it to libgpgme.a but
actually running it always fails with the error "Invalid crypto
engine". When setting a debug environment variable it turns out gpgme
is unable to find/run the needed "gpg.exe" and "gpgconf.exe"
executables. See here for the error trace:
https://gist.github.com/jeroenooms/89a5cce89f50399f183d

The problem can easily be reproduced by running some of the test
programs in ./src/gpgme-1.5.5/tests. For example run-keylist.c will
compile and link, but actually running it will fail with the error
above. I tried hardcoding the path to gpg.exe using
gpgme_set_engine_info() but that does not work either (and should not
be necessary if gpg.exe is in the PATH)

I noticed that pacman uses gpgme for verifying pgp signatures, so I
guess there must be a way to get it to work. Ideally I would like to
compile my a program that will work with either gpg.exe from msys2 or
gpg2win. However I have tried many configurations and they all fail
with the same runtime error.

Any hints?

------------------------------------------------------------------------------
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to