I am attempting to build ovaldi.exe on win32 using visual studio 2010.
It fails to link because libgcrypt.lib is not found.
I've downloaded gpg-w32-dev-20100713.zip, expanded, but do not see libgcrypt.lib. I also built libgcrypt-1.5.0.tar.bz2 using cygwin, but again, do not see libgcrypt.lib.
*** build error ***
1>LINK : fatal error LNK1181: cannot open input file 'libgcrypt.lib'
It's odd, the project does indeed seem to refer to libgcrypt.lib. If you look at the win64 build instructions, it says you can link to libgcrypt.dll.a. So you can try changing the library in the project to that. Also, you can try using VS's "lib.exe" tool to create a *.lib from the *.def files that come with gpg-win32-dev-20100713. The win32 build instructions seem to assume you already have a *.lib file, which IIRC, is not the case (it's been awhile since I built everything from scratch myself).
Thanks! I was able to link (somewhat) successfully with your input of using libgcrypt.dll.a.
Unfortunately, the exe doesn't start properly. I get this error:
The application was unable to start correctly (0xc000007b). Click OK to close the application.
And when I link I get these (likely related) warnings:
1>libgcrypt.dll.a(d000086.o) : warning LNK4078: multiple '.text' sections found with different attributes (E0300020)
1>REGEX.obj : warning LNK4248: unresolved typeref token (0100001C) for 'real_pcre'; image may not run
1>XmlProcessor.obj : warning LNK4248: unresolved typeref token (0100001A) for 'xercesc_2_7.XMLGrammarPool'; image may not run
I get the typeref token warnings too, but the exe seems to run ok. But the other one might be the culprit. I vaguely remember seeing that same error, and I think creating my own lib file fixed it. Since you have VS2010, try creating your own import libs from the provided *.def files. Open a Visual Studio Command Prompt, cd to the directory where the *.def files are, and type
lib /def:libgcrypt.def /machine:x86
that ought to create libgcrypt.lib, and you can try linking to that. And similarly for other gpg DLLs you need to link to.
Perfect, that worked. Thanks a lot for the help.
Log in to post a comment.