This question already has an answer here:
I am trying to build a C++ extension for a module in Python 2.7, 32 bit. The python setup.py build
makes it most of the way through compilation, but fails at the end with the following errors:
libhmac_md5.obj : error LNK2019: unresolved external symbol __imp__CryptReleaseContext@8 referenced in function _libhmac_md5_initialize
libhmac_sha1.obj : error LNK2001: unresolved external symbol __imp__CryptReleaseContext@8
libhmac_md5.obj : error LNK2019: unresolved external symbol __imp__CryptCreateHash@20 referenced in function _libhmac_md5_initialize
libhmac_sha1.obj : error LNK2001: unresolved external symbol __imp__CryptCreateHash@20
libhmac_md5.obj : error LNK2019: unresolved external symbol __imp__CryptAcquireContextW@20 referenced in function _libhmac_md5_initialize
libhmac_sha1.obj : error LNK2001: unresolved external symbol __imp__CryptAcquireContextW@20
libhmac_md5.obj : error LNK2019: unresolved external symbol __imp__CryptDestroyHash@4 referenced in function _libhmac_md5_free
libhmac_sha1.obj : error LNK2001: unresolved external symbol __imp__CryptDestroyHash@4
libhmac_md5.obj : error LNK2019: unresolved external symbol __imp__CryptHashData@16 referenced in function _libhmac_md5_update
libhmac_sha1.obj : error LNK2001: unresolved external symbol __imp__CryptHashData@16
libhmac_md5.obj : error LNK2019: unresolved external symbol __imp__CryptGetHashParam@20 referenced in function _libhmac_md5_finalize
libhmac_sha1.obj : error LNK2001: unresolved external symbol __imp__CryptGetHashParam@20
buildlib.win32-2.7<lib-module>.pyd : fatal error LNK1120: 6 unresolved externals
error: command 'c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe' failed with exit status 1120
My understanding is that the corresponding definitions to the libhmac
methods are not being found, but since this is being compiled in Python 2 instead of a C++ IDE, I don't know how to link something like advapi32.dll
, which I've read in other threads.
Note: this is not the same as asking what an unresolved external symbol is. I am very aware of that at this point, and am looking instead for a method of including the possibly missing files through the Python build command. Stop trolling for reputation.
Thanks for the help!
Aucun commentaire:
Enregistrer un commentaire