建立GMP在64位的Windows [英] Build GMP on 64bit Windows
问题描述
我跟在指令GMP适用于Windows平台的安装说明。我可以建立GMP的32位版本,可用于Visual Studio的。
I have followed the instruction on the "GMP Install Instruction for Windows Platform". I could build a 32bit version of GMP which can be used for Visual Studio.
./configure --prefix=${gmp-install} --disable-static --enable-shared
make
make install
然后我安装mingw_w64和MSYS在另一台机器(这是运行64位的Windows),然后重新运行该命令。
Then I installed mingw_w64 and msys on another machine (which is running 64bit Windows) and rerun the commands.
./配置是没有任何问题的运行。然而,当我运行make,我得到了下面。
./configure was run without any problem. However, when I run "make", I got the following.
m4 -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_add_n -DDLL_EXPORT -DPIC add_n.asm >tmp-add_n.s
gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_add_n -O2 -pedantic -fomit-frame-pointer -mno-cygwin tmp-add_n.s -DDLL_EXPORT -DPIC -o .libs/add_n.o
tmp-add_n.s: Assembler messages:
tmp-add_n.s:84: Error: operand type mismatch for `push'
tmp-add_n.s:85: Error: operand type mismatch for `push'
tmp-add_n.s:86: Error: operand type mismatch for `push'
tmp-add_n.s:107: Error: operand type mismatch for `jmp'
tmp-add_n.s:114: Error: operand type mismatch for `pop'
tmp-add_n.s:115: Error: operand type mismatch for `pop'
tmp-add_n.s:116: Error: operand type mismatch for `pop'
make[2]: *** [add_n.lo] Error 1
make[2]: Leaving directory `/d/Temp/gmp-5.0.1/mpn'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/d/Temp/gmp-5.0.1'
make: *** [all] Error 2
如果我用使用gmake代替,表现出了下面的错误。
If I used "gmake" instead, the following error was shown.
m4 gcc -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_add_n -DDLL_EXPORT -DPIC add_n.asm >tmp-add_n.s
m4: gcc: No such file or directory
gmake[2]: *** [add_n.lo] Error 1
gmake[2]: Leaving directory `d:/Temp/gmp-5.0.1/mpn'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `d:/Temp/gmp-5.0.1'
gmake: *** [all] Error 2
我不熟悉C ++进行。我是否需要以通知mingw_w64,我建设64指定任何标志?谢谢你。
I am not familiar with C++ make. Do I need to specify any flag in order to notify mingw_w64 that I am building for 64bit? Thanks.
推荐答案
我已经试过以下。该库可以成功地建
I have tried the following. The library can be built successfully.
./configure --prefix=/d/Temp/gmp-5.0.1-install --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --disable-static --enable-shared
这篇关于建立GMP在64位的Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!