【问题标题】:Building m2crypto: 7 unresolved externals构建 m2crypto:7 个未解决的外部问题
【发布时间】:2013-05-01 13:51:09
【问题描述】:

我尝试为 win-amd64-py3.3 构建 M2Crypto (github):

python setup.py build --compiler msvc

我遇到了链接器未解决的外部符号错误 (full log):

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:D:\Programy\Python33\libs /LIBPATH:D:\Programy\Python33\PCbuild\amd64 /LIBPATH:c:\pkg\lib ssleay32.lib libeay32.lib /EXPORT:PyInit___m2crypto build\temp.win-amd64-3.3\Release\SWIG/_m2crypto_wrap.obj /OUT:build\lib.win-amd64-3.3\M2Crypto\__m2crypto.pyd /IMPLIB:build\temp.win-amd64-3.3\Release\SWIG\__m2crypto.lib /MANIFESTFILE:build\temp.win-amd64-3.3\Release\SWIG\__m2crypto.pyd.manifest
_m2crypto_wrap.obj : warning LNK4197: export 'PyInit___m2crypto' specified multiple times; using first specification
Creating library build\temp.win-amd64-3.3\Release\SWIG\__m2crypto.lib and object build\temp.win-amd64-3.3\Release\SWIG\__m2crypto.exp
_m2crypto_wrap.obj : error LNK2019: unresolved external symbol PyString_AsStringAndSize referenced in function m2_PyString_AsStringAndSizeInt
_m2crypto_wrap.obj : error LNK2019: unresolved external symbol PyString_FromStringAndSize referenced in function bn_to_mpi
_m2crypto_wrap.obj : error LNK2019: unresolved external symbol PyInt_AS_LONG referenced in function asn1_integer_set
_m2crypto_wrap.obj : error LNK2019: unresolved external symbol PyBuffer_New referenced in function ec_key_get_public_der
_m2crypto_wrap.obj : error LNK2019: unresolved external symbol PyFile_AsFile referenced in function _wrap_err_print_errors_fp
_m2crypto_wrap.obj : error LNK2019: unresolved external symbol PyFile_Check referenced in function _wrap_err_print_errors_fp
_m2crypto_wrap.obj : error LNK2019: unresolved external symbol PyInstance_New referenced in function ssl_verify_callback
build\lib.win-amd64-3.3\M2Crypto\__m2crypto.pyd : fatal error LNK1120: 7 unresolved externals

发生了什么事?我正在使用Win64 OpenSSL v1.0.1e。我需要较旧的库吗?

【问题讨论】:

    标签: build openssl windows-7-x64 python-3.3 m2crypto


    【解决方案1】:

    从完整日志看来,第一个问题是编译器找不到 python c 头文件。然后链接器找不到python库。可能 cl.exe 的选项不好(不应该是 /ID:\... 而不是 -ID:\...?)或者你没有安装 python 头文件。

    【讨论】:

      猜你喜欢
      • 2013-03-19
      • 2014-01-03
      • 1970-01-01
      • 2014-05-06
      • 2020-10-15
      • 2011-12-19
      • 2017-09-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多