I used MinGW to compile GPGME, but GPGME didn’t seem to correctly recognize the configuration information provided by gpgconf when it was initialized.
I use the following code to output gpgme engine information.
while (engineInfo != nullptr) { qDebug() << gpgme_get_protocol_name(engineInfo->protocol) << engineInfo->file_name << engineInfo->protocol << engineInfo->home_dir << engineInfo->version; engineInfo = engineInfo->next; }
This is the corresponding output
GPGCONF C:\msys64\mingw64\bin\gpgconf.exe 2 1.0.0 Spawn /nonexistent 6 1.0.0
I tried to execute gpgconf.exe in the target path. The corresponding path of its actual gpg tool group is correct.
> C:\msys64\mingw64\bin>C:\msys64\mingw64\bin\gpgconf.exe gpg:OpenPGP:C%3a\msys64\mingw64\bin\gpg.exe gpgsm:S/MIME:C%3a\msys64\mingw64\bin\gpgsm.exe keyboxd:Public Keys:C%3a\msys64\mingw64\bin\keyboxd.exe gpg-agent:Private Keys:C%3a\msys64\mingw64\bin\gpg-agent.exe scdaemon:Smartcards:C%3a\msys64\mingw64\bin\scdaemon.exe tpm2daemon:TPM:C%3a\msys64\mingw64\bin\tpm2daemon.exe dirmngr:Network:C%3a\msys64\mingw64\bin\dirmngr.exe pinentry:Passphrase Entry:C%3a\msys64\mingw64\bin\pinentry.exe
What is going on here, Gpg4Win can run normally, but my program also uses gpgme but it fails.