PyCrypto builds neither with MSVC nor MinGW

Alec Taylor alec.taylor6 at gmail.com
Mon Mar 12 22:21:51 CET 2012


FYI: When running "vcvarsall" manually, I get a variety of linker
errors, even though I have the SDK and everything else installed:

running build_ext
building 'Crypto.Random.OSRNG.winrandom' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c
/nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc/ -Isrc/inc-msvc/
-Ic:\usr\src\include -IC:\Python27\include -IC:\Python27\PC
/Tcsrc/winrand.c /Fobuild\temp.win-amd64-2.7\Release\src/winrand.obj
winrand.c
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe
/DLL /nologo /INCREMENTAL:NO /LIBPATH:c:\usr\src\lib
/LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild\amd64
ws2_32.lib advapi32.lib /EXPORT:initwinrandom
build\temp.win-amd64-2.7\Release\src/winrand.obj
/OUT:build\lib.win-amd64-2.7\Crypto\Random\OSRNG\winrandom.pyd
/IMPLIB:build\temp.win-amd64-2.7\Release\src\winrandom.lib
/MANIFESTFILE:build\temp.win-amd64-2.7\Release\src\winrandom.pyd.manifest
   Creating library build\temp.win-amd64-2.7\Release\src\winrandom.lib
and object build\temp.win-amd64-2.7\Release\src\winrandom.exp
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyObject_Free referenced in function _WRdealloc
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyExc_SystemError referenced in function _WRdealloc
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyErr_Format referenced in function _WRdealloc
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyExc_TypeError referenced in function _WRdealloc
winrand.obj : error LNK2019: unresolved external symbol
__imp___PyObject_New referenced in function _winrandom_new
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyArg_ParseTupleAndKeywords referenced in function
_winrandom_new
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyString_FromStringAndSize referenced in function _WR_get_bytes
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyMem_Free referenced in function _WR_get_bytes
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyErr_NoMemory referenced in function _WR_get_bytes
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyMem_Malloc referenced in function _WR_get_bytes
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyErr_SetString referenced in function _WR_get_bytes
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyExc_ValueError referenced in function _WR_get_bytes
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyArg_ParseTuple referenced in function _WR_get_bytes
winrand.obj : error LNK2019: unresolved external symbol
__imp__Py_FindMethod referenced in function _WRgetattr
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyInt_FromLong referenced in function _WRgetattr
winrand.obj : error LNK2019: unresolved external symbol
__imp__Py_FatalError referenced in function _initwinrandom
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyErr_Occurred referenced in function _initwinrandom
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyModule_AddStringConstant referenced in function
_initwinrandom
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyModule_AddIntConstant referenced in function _initwinrandom
winrand.obj : error LNK2019: unresolved external symbol
__imp__Py_InitModule4 referenced in function _initwinrandom
winrand.obj : error LNK2019: unresolved external symbol
__imp__PyType_Type referenced in function _initwinrandom
build\lib.win-amd64-2.7\Crypto\Random\OSRNG\winrandom.pyd : fatal
error LNK1120: 21 unresolved externals



More information about the Python-list mailing list