我在使用 64 位 Python 2.7 的 Windows 上
我下载了 hunspell和pyhunspell。
使用 64 位 MinGW 系统,我成功编译了 hunspell 项目 - 生成了可执行的 hunspell 工具和 hunspell 库。构建后这是我的文件夹结构:
+---hunspell-0.1
\---hunspell-1.3.3
+---intl
+---m4
+---man
| \---hu
+---po
+---src
| +---hunspell
| | +---.deps
| | \---.libs
| +---parsers
| | +---.deps
| | \---.libs
| +---tools
| | +---.deps
| | \---.libs
| \---win_api
\---tests
\---suggestiontest
在文件夹hunspell-0.1
中我有 pyhunspell 项目。我打开setup.py
文件并像这样更改它:
main = Extension('hunspell',
libraries = ['../hunspell-1.3.3/src/hunspell/.libs/hunspell-1.3'],
include_dirs = ['../hunspell-1.3.3/src/hunspell'],
sources = ['hunspell.c'],
extra_compile_args = ['-Wall'])
执行python setup.py build -c mingw32
结果如下:构建日志以错误消息结尾:
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-mingw_helpers.o): bad reloc address 0x0 in section ".pdata"'
任何想法可能是什么问题?