2

我已经在 Windows-7 环境中使用 gcc 4.7.2 构建了 gmp 5.1.1 库。我使用 ./configure 配置构建并命令 make 并在完成 make 检查后没有任何错误。但是,当我将生成的 libgmp.a 放入 Python33/libs 并午餐时

c:\Users\egargio\Downloads\pycrypto-2.6\pycrypto-2.6>c:\Python33\python setup.py
 build_ext --compiler=mingw32

发生以下报告 libgmp.a 不兼容的错误:

c:\Users\egargio\Downloads\pycrypto-2.6\pycrypto-2.6>c:\Python33\python setup.py
 build_ext --compiler=mingw32
running build_ext
running build_configure
building 'Crypto.PublicKey._fastmath' extension
C:\MinGW64\bin\gcc.exe -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/
-Ic:\Python33\include -Ic:\Python33\include -c src/_fastmath.c -o build\temp.win
-amd64-3.3\Release\src\_fastmath.o
writing build\temp.win-amd64-3.3\Release\src\_fastmath.def
C:\MinGW64\bin\gcc.exe -shared -Wl,--enable-auto-image-base -s build\temp.win-am
d64-3.3\Release\src\_fastmath.o build\temp.win-amd64-3.3\Release\src\_fastmath.d
ef -Lc:\Python33\libs -Lc:\Python33\PCbuild\amd64 -lgmp -lpython33 -lmsvcr100 -o
 build\lib.win-amd64-3.3\Crypto\PublicKey\_fastmath.pyd
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:\Python33\libs/libgmp.a when searching for
 -lgmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:\Python33\libs\libgmp.a when searching for
 -lgmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:\Python33\libs/libgmp.a when searching for
 -lgmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lgmp
collect2.exe: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

请问有什么建议吗?谢谢。

——乔治

4

0 回答 0