无法在Windows 10 collect2.exe上使用Python27 MingGW安装leven包

时间:2015-12-02 12:55:41

标签: python c++ python-2.7 mingw windows-10

我尝试使用python 2.7.10,windows 10和mingw安装leven包(https://pypi.python.org/pypi/leven/)。我收到以下错误:

" collect2.exe:错误:ld返回1退出状态"

任何有关这方面的帮助都会非常感激。我已经尝试安装这几天了。我使用此解决方案克服了一些问题,包括以前的collect2.exe错误:Unable to Install pyslalib package using python2.7 / MINGW on Windows 10

然而,在修复该问题后,另一个错误激增。这是错误:

 C:\bin\leven-1.0.4.tar\dist\leven-1.0.4>python setup.py install
 running install
 running bdist_egg
 running egg_info
 writing requirements to leven.egg-info\requires.txt
 writing leven.egg-info\PKG-INFO
 writing top-level names to leven.egg-info\top_level.txt
 writing dependency_links to leven.egg-info\dependency_links.txt
 reading manifest file 'leven.egg-info\SOURCES.txt'
 reading manifest template 'MANIFEST.in'
 writing manifest file 'leven.egg-info\SOURCES.txt'
 installing library code to build\bdist.win32\egg
 running install_lib
 running build_py
 running build_ext
 building 'leven._levenshtein' extension
 C:\Program Files (x86)\CodeBlocks\MinGW\bin\gcc.exe -mdll -O -Wall -Ileven -IC:\Python27\include -IC:\Python27\PC -c leven/_levenshtein.cpp -o build\temp.win32-2.7\Release\leven\_levenshtein.o
 leven/_levenshtein.cpp: In function 'void __Pyx_RaiseArgtupleInvalid(const char*, int, Py_ssize_t, Py_ssize_t, Py_ssize_t)':
 leven/_levenshtein.cpp:1400:59: warning: unknown conversion type character 'z' in format [-Wformat]
 leven/_levenshtein.cpp:1400:59: warning: format '%s' expects argument of type 'char*', but argument 5 has type 'Py_ssize_t {aka int}' [-Wformat]
 leven/_levenshtein.cpp:1400:59: warning: unknown conversion type character 'z' in format [-Wformat]
 leven/_levenshtein.cpp:1400:59: warning: too many arguments for format [-Wformat-extra-args]
 writing build\temp.win32-2.7\Release\leven\_levenshtein.def
 C:\Program Files (x86)\CodeBlocks\MinGW\bin\g++.exe -mdll -static --entry _DllMain@12 -out-implib=build\temp.win32-2.7\Release\leven\lib_levenshtein.a --def build\temp.win32-2.7\Release\leven\_levenshtein.def -s build\temp.win32-2.7\Release\leven\_levenshtein.o -LC:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lmsvcr90 -o build\lib.win32-2.7\leven\_levenshtein.pyd
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xbe): undefined reference to `_imp__PyExc_TypeError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xc9): undefined reference to `_imp__PyErr_Format'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x114): undefined reference to `_imp__PyErr_Occurred'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x280): undefined reference to `_imp__PyExc_MemoryError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x293): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2b9): undefined reference to `_imp__PyExc_TypeError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2cc): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2f2): undefined reference to `_imp__PyExc_ValueError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x305): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x32b): undefined reference to `_imp__PyExc_ValueError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x33e): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x364): undefined reference to `_imp__PyExc_IOError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x377): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x39d): undefined reference to `_imp__PyExc_IndexError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x3b0): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x3d6): undefined reference to `_imp__PyExc_OverflowError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x3e9): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x40f): undefined reference to `_imp__PyExc_ArithmeticError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x422): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x448): undefined reference to `_imp__PyExc_ArithmeticError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x45b): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x47e): undefined reference to `_imp__PyExc_RuntimeError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x491): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x4b1): undefined reference to `_imp__PyExc_RuntimeError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x4c4): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x502): undefined reference to `_imp__PyString_FromString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x515): undefined reference to `_imp__PyImport_Import'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x53e): undefined reference to `_imp__PyString_FromString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x555): undefined reference to `_imp__PyObject_GetAttr'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x5a5): undefined reference to `_imp__PyExc_TypeError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x5b0): undefined reference to `_imp__PyErr_Format'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x5f1): undefined reference to `_imp__PyOS_snprintf'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x60a): undefined reference to `_imp__PyErr_WarnEx'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x62f): undefined reference to `_imp__PyExc_ValueError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x63a): undefined reference to `_imp__PyErr_Format'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x6f9): undefined reference to `_imp__PyString_FromString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x728): undefined reference to `_imp__PyString_FromFormat'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x739): undefined reference to `_imp__PyString_FromString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x79f): undefined reference to `_imp__PyCode_New'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x80b): undefined reference to `_imp__PyMem_Malloc'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x89e): undefined reference to `_imp__PyMem_Realloc'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x903): undefined reference to `_imp__PyModule_GetDict'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x91c): undefined reference to `_imp___PyThreadState_Current'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x927): undefined reference to `_imp__PyFrame_New'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x93d): undefined reference to `_imp__PyTraceBack_Here'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x998): undefined reference to `_imp__PyString_FromString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xaa7): undefined reference to `_imp__PyDict_Size'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xaec): undefined reference to `_imp__PyDict_GetItem'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xb23): undefined reference to `_imp__PyDict_GetItem'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xb9b): undefined reference to `_imp__PyDict_GetItem'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xc51): undefined reference to `_imp___PyString_Eq'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xcdc): undefined reference to `_imp___PyString_Eq'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xd40): undefined reference to `_imp__PyUnicodeUCS2_Compare'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xd50): undefined reference to `_imp__PyErr_Occurred'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xde2): undefined reference to `_imp__PyUnicodeUCS2_Compare'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xdf2): undefined reference to `_imp__PyErr_Occurred'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xe53): undefined reference to `_imp__PyDict_Next'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xe7b): undefined reference to `_imp__PyString_AsString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xe94): undefined reference to `_imp__PyExc_TypeError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xe9f): undefined reference to `_imp__PyErr_Format'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xeb9): undefined reference to `_imp__PyExc_TypeError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xecf): undefined reference to `_imp__PyErr_Format'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xeef): undefined reference to `_imp__PyString_AsString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xf08): undefined reference to `_imp__PyExc_TypeError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xf13): undefined reference to `_imp__PyErr_Format'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xf8a): undefined reference to `_imp__PyObject_Size'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xfa0): undefined reference to `_imp__PyObject_Size'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0xfea): undefined reference to `_imp__PyString_AsStringAndSize'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1012): undefined reference to `_imp__PyErr_Occurred'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1048): undefined reference to `_imp__PyString_AsStringAndSize'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1070): undefined reference to `_imp__PyErr_Occurred'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x14d1): undefined reference to `_imp__PyObject_GetAttr'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x14f8): undefined reference to `_imp__PyTuple_New'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1509): undefined reference to `_imp__PyUnicode_Type'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1549): undefined reference to `_imp__PyObject_Call'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x15b6): undefined reference to `_imp__PyTuple_New'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x15e3): undefined reference to `_imp__PyObject_Call'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x161c): undefined reference to `_imp___Py_NoneStruct'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x163e): undefined reference to `_imp___Py_NoneStruct'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x165c): undefined reference to `_imp__PyTraceBack_Type'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x166e): undefined reference to `_imp__PyExc_TypeError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1684): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x16ca): undefined reference to `_imp__PyErr_NormalizeException'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x16e6): undefined reference to `_imp__PyExc_TypeError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x16fc): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1716): undefined reference to `_imp__PyExc_BaseException'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1737): undefined reference to `_imp__PyType_IsSubtype'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1748): undefined reference to `_imp__PyExc_TypeError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1753): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x176b): undefined reference to `_imp___PyThreadState_Current'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1911): undefined reference to `_imp___Py_TrueStruct'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x191a): undefined reference to `_imp___Py_ZeroStruct'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1927): undefined reference to `_imp___Py_NoneStruct'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1946): undefined reference to `_imp__PyObject_IsTrue'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x19a2): undefined reference to `_imp__PyGILState_Ensure'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x19b3): undefined reference to `_imp__PyExc_ZeroDivisionError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x19be): undefined reference to `_imp__PyErr_Format'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x19cb): undefined reference to `_imp__PyGILState_Release'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1a1d): undefined reference to `_imp__PyFloat_FromDouble'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1a46): undefined reference to `_imp__PyLong_FromUnsignedLong'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1f1c): undefined reference to `_imp__PyString_Type'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1fbd): undefined reference to `_imp__PyOS_snprintf'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x1fc5): undefined reference to `_imp__Py_GetVersion'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x202b): undefined reference to `_imp__PyOS_snprintf'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2044): undefined reference to `_imp__PyErr_WarnEx'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2059): undefined reference to `_imp__PyTuple_New'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x207b): undefined reference to `_imp__PyString_FromStringAndSize'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x20b5): undefined reference to `_imp__Py_InitModule4'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x20cd): undefined reference to `_imp__PyModule_GetDict'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x20e9): undefined reference to `_imp__PyImport_AddModule'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2110): undefined reference to `_imp__PyObject_SetAttrString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2131): undefined reference to `_imp__PyString_FromStringAndSize'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2137): undefined reference to `_imp__PyString_InternFromString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2159): undefined reference to `_imp__PyUnicodeUCS2_DecodeUTF8'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x21b9): undefined reference to `_imp__PyObject_SetAttrString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2203): undefined reference to `_imp__PyObject_GetAttr'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x221f): undefined reference to `_imp__PyExc_NameError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x222a): undefined reference to `_imp__PyErr_Format'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x22f2): undefined reference to `_imp__PyCode_New'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2377): undefined reference to `_imp___Py_ZeroStruct'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x239c): undefined reference to `_imp__PyCFunction_NewEx'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x23c1): undefined reference to `_imp__PyDict_SetItem'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x23e1): undefined reference to `_imp__PyDict_New'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2406): undefined reference to `_imp__PyDict_SetItem'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2429): undefined reference to `_imp__PyDict_SetItem'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x24a7): undefined reference to `_imp__PyErr_Occurred'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x24bc): undefined reference to `_imp__PyExc_ImportError'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x24c7): undefined reference to `_imp__PyErr_SetString'
 build\temp.win32-2.7\Release\leven\_levenshtein.o:_levenshtein.cpp:(.text+0x2558): undefined reference to `_imp__PyTuple_Pack'
 collect2.exe: error: ld returned 1 exit status
 error: command 'C:\\Program Files (x86)\\CodeBlocks\\MinGW\\bin\\g++.exe' failed with exit status 1

 C:\bin\leven-1.0.4.tar\dist\leven-1.0.4>

提前谢谢。

1 个答案:

答案 0 :(得分:1)

这些错误是对python核心库(libpython27.a的{​​{1}})的引用。确保:

  1. 它存在并与您的gcc架构相匹配。当您使用32位gcc和64位库时,通常会出现这些错误。
  2. 我发现您正在使用C:\Python27\libs来创建此库,它也可能有误,请参阅http://www.mingw.org/wiki/msvc_and_mingw_dlls - 它可以为所有导出的名称添加额外的_并且您需要按照描述将其删除:< / LI>
      

    pexports python27.dll | sed“s / ^ _ //”&gt; python27.def

    1. 使用MSVC 2008构建并链接到pexports的Python标准Windows分发版,当mingw-gcc将二进制文件与msvcr90.dll链接时 - 它可能会导致很多问题(崩溃)。您需要关注this guide以使用msvcrt.dll
    2. 建立您的gcc链接