[BACK]Return to gmp-on-Windows.txt CVS log [TXT][DIR] Up to [local] / OpenXM / doc / HOWTO

Annotation of OpenXM/doc/HOWTO/gmp-on-Windows.txt, Revision 1.2

1.1       ohara       1: Windows $B$K$*$1$k(B GMP/MPFR/MPC $B$N%S%k%IK!(B
                      2:
                      3: Risa/Asir $B$N%i%$%;%s%9$NET9g>e!"(BLGPL $B$N%i%$%V%i%j$H$OF0E*7k9g$9$kI,MW$,$"$k!#(B
                      4: $B$3$NJ8=q$G$O!"(BWindows $B$K$*$$$F(B GNU MP ($B$^$?$O(B MPIR), MPFR, MPC $B$NF0E*%i%$%V%i%j(B
                      5: (*.dll)$B$*$h$S%$%s%]!<%H%i%$%V%i%j(B(*.lib)$B$r:n@.$9$kJ}K!$r@bL@$9$k!#(B
                      6:
                      7: $BBh0lIt(B: Visual Studio 2013$BJT(B
                      8:
                      9: 1. $B=`Hw(B
                     10:
                     11: MPIR, MPFR, MPC $B$N%=!<%9$rE,Ev$J%G%#%l%/%H%j(B($BNc(B: c:\Users\ohara\OpenXM_dist )
                     12: $B$KMQ0U$9$k!#$3$3$G$O!"0J2<$N%P!<%8%g%s$rMQ$$$k!#(B
                     13:
                     14: mpir-2.7.0.zip
                     15: mpfr-3.1.3.tar.bz2
                     16: mpc-1.0.3.tar.gz
                     17:
                     18: $B$^$?!"(Bmpfr, mpc $B$K$D$$$F$O!"(Bhttp://www.gladman.me.uk/ $B$+$i(B
                     19: Visual Studio $BMQ$N%W%m%8%'%/%H%U%!%$%k$rF~<j$9$k!#$"$o$;$F(B
                     20: vsyasm $B$b%$%s%9%H!<%k$7$F$*$/$3$H!#(B
                     21:
                     22: $B$^$:!"$=$l$>$l$N%=!<%9$rE83+$9$k!#(B(mingw $B$r;H$&!#E,;~!"FI$_$+$($k$3$H(B)
                     23:
                     24: d=/c/Users/ohara/OpenXM_dist
                     25: unzip $d/mpir-2.7.0.zip
                     26: tar jxf $d/mpfr-3.1.3.tar.bz2
                     27: tar zxf $d/mpc-1.0.3.tar.gz
                     28: for i in mpir-2.7.0 mpfr-3.1.3 mpc-1.0.3; do mv $i ${i%-*}; done
                     29: (cd mpfr; unzip $d/mpfr.svn9046.build.vc12.zip;
                     30:  cd src; touch fpif.c  get_float128.c  rndna.c  set_float128.c;
                     31:  cd x86_64; cp -Rp core2 corei5)
                     32: (cd mpfr; unzip $d/mpc.svn1450.build.vc12.zip)
                     33:
                     34:
                     35: 2. MPIR $B$N%S%k%I(B
                     36:
                     37: mpir/build.vc12/mpir.sln $B$r3+$/!#(B
                     38:
                     39: $B<B9T;~$K(B msvcr120.dll (Visual C++ $B:FHRI[2DG=%Q%C%1!<%8(B) $B$K0MB8$7$J$$$h(B
                     40: $B$&$K!"(Bdll $B$r:n@.$9$k$?$a$K!"%j%s%+$N@_Dj$rJQ99$9$k!#%/%i%9%S%e!<$G!"(B
                     41: dll_mpir_gc $B$N%W%m%Q%F%#$r3+$-!"!V9=@.%W%m%Q%F%#!W(B->$B!V(BC/C++$B!W(B->
                     42: $B!V%3!<%I@8@.!W(B->$B!V%i%s%?%$%`%i%$%V%i%j!W$,!"(BRelease/Win32 $B$N$H$-$K!"(B
                     43: $B!V%^%k%A%9%l%C%I(B(/MT)$B!W$G$"$k$3$H$r3NG'$9$k!#(BRelease/Win32 $B$K$D$$$F!"(B
                     44: dll_mpir_gc $B$r%S%k%I$9$k!#(B
                     45:
                     46: $B$^$?!"%/%i%9%S%e!<$G!"(Bdll_mpir_core2 $B$N%W%m%Q%F%#$r3+$-!"F1$8$h$&$K!"(B
                     47: $B!V%i%s%?%$%`%i%$%V%i%j!W$,!"(BRelease/x64 $B$N$H$-$K!"(B
                     48: $B!V%^%k%A%9%l%C%I(B(/MT)$B!W$G$"$k$3$H$r3NG'$9$k!#(BRelease/x64 $B$K$D$$$F!"(B
                     49: dll_mpir_core2 $B$r%S%k%I$9$k!#(B
                     50:
                     51: $B@8@.J*$O!"(Bmpir/dll/{Win32,x64}/Release/ $B$K$"$k!#(B
                     52:
                     53:
                     54: 3. MPFR $B$N%S%k%I(B
                     55:
                     56: mpir/build.vc12/dll_mpfr.sln $B$r3+$/!#(B
                     57:
                     58: ******** $B$3$N%W%m%8%'%/%H%U%!%$%k$K$O%P%0$,$"$k!#(B ********
                     59:
                     60: $B%/%i%9%S%e!<$G!"(Bdll_mpfr $B$N%W%m%Q%F%#$r3+$-!"!V9=@.%W%m%Q%F%#!W(B->
                     61: $B!V(BC/C++$B!W(B->$B!V%3!<%I@8@.!W(B->$B!V%W%j%W%m%;%C%5!W(B->$B!V%W%j%W%m%;%C%5$NDj5A!W(B
                     62: $B$r3NG'$7!"(BRelease/Win32 $B$N$H$-$K!"!V(B_WIN64$B!W$NDj5A$r:o=|$9$k!#(B
                     63:
                     64: ******** $B$3$l$G%P%0$N=$@5$O40N;$G$"$k!#(B ********
                     65:
                     66: $B<!$K!"!V%i%s%?%$%`%i%$%V%i%j!W$,!"(BRelease/Win32 $B$*$h$S(B Release/x64
                     67: $B$N$H$-$K!"!V%^%k%A%9%l%C%I(B(/MT)$B!W$G$"$k$3$H$r3NG'$9$k!#(B
                     68:
                     69: Release/Win32 $B$*$h$S(B Release/x64 $B$K$D$$$F!"(Bdll_mpfr $B$r%S%k%I$9$k!#(B
                     70:
                     71: $B@8@.J*$O!"(Bmpfr/dll/{Win32,x64}/Release/ $B$K$"$k!#(B
                     72:
                     73: 4. MPC $B$N%S%k%I(B
                     74:
                     75: mpc/build.vc12/mpc.sln $B$r3+$/!#<!$K%/%i%9%S%e!<$G!"(Bmpc_dll $B$N%W%m%Q%F%#$r3+$-!"(B
                     76: $B!V9=@.%W%m%Q%F%#!W(B->$B!V(BC/C++$B!W(B->$B!V%3!<%I@8@.!W(B->$B!V%i%s%?%$%`%i%$%V%i%j!W$,!"(B
                     77: Release/Win32 $B$*$h$S(B Release/x64 $B$N$H$-$K!"!V%^%k%A%9%l%C%I(B(/MT)$B!W$G$"$k$3$H$r3NG'$9$k!#(B
                     78:
                     79: Release/Win32 $B$*$h$S(B Release/x64 $B$K$D$$$F!"(Bmpc_dll $B$r%S%k%I$9$k!#(B
                     80:
                     81: $B@8@.J*$O!"(Bmpc/dll/{Win32,x64}/Release/ $B$K$"$k!#(B
                     82:
                     83:
                     84: 5. $B%S%k%I$N8e(B
                     85:
                     86: {mpir,mpfr,mpc}/dll/{Win32,x64}/Release/
                     87: $B$K%U%!%$%k$,@8@.$5$l$k!#(B
                     88:
                     89: $B:G=*E*$KI,MW$JJ*$O!"(B
                     90: $B%X%C%@(B gmp.h, gmpxx.h, mpfr.h, mpc.h
                     91: $BF0E*%i%$%V%i%j(B mpir.dll, mpfr.dll, mpc.dll
                     92: $B%$%s%]!<%H%i%$%V%i%j(B mpir.lib, mpfr.lib, mpc.lib
                     93: $B$G$"$k!#(B
                     94:
                     95:
                     96: $BBhFsIt(B: MinGW $BJT(B
                     97:
                     98: mingw/msys2 $B$N%$%s%9%H!<%kJ}K!$K$D$$$F$O!"(B
                     99: how_to_install_MinGW-MSYS2.txt $B$r;2>H$N$3$H!#(B
                    100:
                    101: 1. $B35@b!&J}?K(B
                    102:
                    103: $B@EE*%i%$%V%i%j$N@8@.$rHr$1$k$?$a!"(Bconfigure $B$N%*%W%7%g%s$K!"(B
                    104: --enable-shared --disable-static
                    105: $B$r2C$($k$3$H$H$9$k!#(B
                    106:
                    107: $B$5$i$K!"Hs(B mingw $B4D6-$G$b<B9T2DG=$J%i%$%V%i%j$r:n@.$7$?$$!#(B
                    108:
                    109: $B$3$3$GLdBj$K$J$k$N$,!"(Bmingw $B$K$*$1$kNc30=hM}$NJ}K!$G$"$k!#(BWindows $B$NI8(B
                    110: $B=`(B(= VisualStudio)$B$G$O!"(BSEH ($B9=B$2=Nc30=hM}(B)$B$r;H$&$3$H$K$J$C$F$$$F!"(B
                    111: MinGW 64 $B$G$O!"(Bgcc $B$b%5%]!<%H$9$k!#(B
                    112:
                    113: $B$7$+$7$J$,$i!"(BMinGW 32 $B$N(B gcc $B$O(B dwarf-2 $BNc30=hM}$r;HMQ$7!"(BSEH $B$O%5%]!<(B
                    114: $B%H$7$F$$$J$$!#$=$N$?$a!"$3$l$r<B8=$9$k(B libgcc_s_dw2-1.dll $B$H%j%s%/$7$h(B
1.2     ! fujimoto  115: $B$&$H$9$k!#$3$l$rHr$1$k$K$O!"(Bgcc $B$K%*%W%7%g%s(B -static-libgcc $B$rM?$($k$+!"(B
        !           116: win32threads $B$J(B gcc $B$r;HMQ$9$k!#8e<T$K$D$$$F$O!"(Bhow_to_install_MinGW-MSYS2.txt
        !           117: $B$N(B 3 $B@a$r;2>H$N$3$H!#(B
1.1       ohara     118:
                    119:
                    120: 2. $B%S%k%I(B
                    121:
                    122: GNU MP, MPFR, MPC $B$N%=!<%9$rE,Ev$J%G%#%l%/%H%j(B($BNc(B: c:\Users\ohara\OpenXM_dist )
                    123: $B$KMQ0U$9$k!#$3$3$G$O!"0J2<$N%P!<%8%g%s$rMQ$$$k!#(B
                    124:
                    125: gmp-5.1.3.tar.gz
                    126: mpfr-3.1.3.tar.bz2
                    127: mpc-1.0.3.tar.gz
                    128:
1.2     ! fujimoto  129: $BIUO?(B1 $B$^$?$OIUO?(B2 $B$GM?$($k%7%'%k%9%/%j%W%H(B mk.sh $B$r<B9T$7$F!"%i%$%V%i%j$r:n@.$9$k!#(B
1.1       ohara     130: $B@8@.J*$O!"(B${LOCAL}/{bin,include,lib} $B$K=PNO$5$l$k!#(B
                    131:
1.2     ! fujimoto  132:
1.1       ohara     133: 3. Visual Studio $BMQ%$%s%]!<%H%i%$%V%i%j(B
                    134:
                    135: mingw $BIUB0$N(B gendef $B$N=PNO$9$k(B *.def $B$r!"(BMS lib.exe $B$G=hM}$9$k$3$H$K$h$j!"(B
1.2     ! fujimoto  136: $B%$%s%]!<%H%i%$%V%i%j$r:n@.$G$-$k!#6qBNE*$K$O!"IUO?(B3 $B$GM?$($k%P%C%A%U%!%$%k$r(B
1.1       ohara     137: *.def $B$NB8:_$9$k%G%#%l%/%H%j(B (${LOCAL}/bin) $B$G<B9T$9$k$H$h$$!#(B
                    138:
                    139: A. $BIUO?(B1
                    140:
                    141: $B!V(Bmingw-w64 win64 shell$B!W$^$?$O!V(Bmingw-w64 win32 shell$B!W>e$G<B9T$9$k%7%'%k%9%/%j%W%H$G$"$k!#(B
                    142:
                    143: #!/bin/bash
                    144:
                    145: LOCAL=/usr/local"${MSYSTEM#MINGW}"
                    146: [ -d ${LOCAL} ] || mkdir -p ${LOCAL}
                    147:
                    148: dist=/c/Users/ohara/OpenXM_dist
                    149: gmp=gmp-5.1.3
                    150: mpf=mpfr-3.1.3
                    151: mpc=mpc-1.0.3
                    152:
                    153: for i in ${gmp}.tar.gz ${mpf}.tar.bz2 ${mpc}.tar.gz ; do case "$i" in *.bz2) tar jxf ${dist}/"$i";; *.gz) tar zxf ${dist}/"$i";; esac; done
                    154:
                    155: pushd ${gmp}
                    156: ./configure --prefix=${LOCAL} --enable-shared --disable-static --disable-cxx
                    157: make
                    158: if [ "$MSYSTEM" = MINGW32 ]; then
                    159:        gcc -static-libgcc -shared .libs/*.o */.libs/*.o -m32 -Wl,--export-all-symbols -Wl,--output-def -Wl,.libs/libgmp-3.dll.def -o .libs/libgmp-10.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgmp.dll.
                    160: a
                    161: fi
                    162: make install
                    163: (cd .libs; gendef libgmp-10.dll; cp -p libgmp-10.def ${LOCAL}/bin)
                    164: popd
                    165:
                    166: pushd ${mpf}
                    167: ./configure --prefix=${LOCAL} --enable-shared --disable-static --with-gmp=${LOCAL} --disable-thread-safe
                    168: make
                    169: if [ "$MSYSTEM" = MINGW32 ]; then
                    170:        cd src
                    171:        gcc -static-libgcc -shared .libs/*.o -L${LOCAL}/lib ${LOCAL}/lib/libgmp.dll.a -m32 -Wl,--output-def -Wl,.libs/libmpfr-4.dll.def -o .libs/libmpfr-4.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libmpfr.dll.a
                    172:        cd ..
                    173: fi
                    174: make install
                    175: (cd src/.libs; gendef libmpfr-4.dll; cp -p libmpfr-4.def ${LOCAL}/bin)
                    176: popd
                    177:
                    178: pushd ${mpc}
                    179: ./configure --prefix=${LOCAL} --enable-shared --disable-static --with-gmp=${LOCAL} --with-mpfr=${LOCAL}
                    180: make
                    181: if [ "$MSYSTEM" = MINGW32 ]; then
                    182:        cd src
                    183:     gcc -static-libgcc -shared .libs/*.o -L${LOCAL}/lib ${LOCAL}/lib/libmpfr.dll.a ${LOCAL}/lib/libgmp.dll.a -m32 -o .libs/libmpc-3.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libmpc.dll.a
                    184:        cd ..
                    185: fi
                    186: make install
                    187: (cd src/.libs; gendef libmpc-3.dll; cp -p libmpc-3.def ${LOCAL}/bin)
                    188: popd
                    189:
1.2     ! fujimoto  190:
1.1       ohara     191: B. $BIUO?(B2
                    192:
1.2     ! fujimoto  193: $B!V(BMinGW-w64 Win64 Shell w32threads$B!W$^$?$O!V(BMinGW-w64 Win32 Shell w32threads$B!W>e$G<B9T$9$k%7%'%k%9%/%j%W%H$G$"$k!#(B
        !           194:
        !           195: #!/bin/bash
        !           196:
        !           197: LOCAL=/usr/local"${MSYSTEM#MINGW}"
        !           198: [ -d ${LOCAL} ] || mkdir -p ${LOCAL}
        !           199:
        !           200: dist=/c/Users/ohara/OpenXM_dist
        !           201: gmp=gmp-5.1.3
        !           202: mpf=mpfr-3.1.3
        !           203: mpc=mpc-1.0.3
        !           204:
        !           205: for i in ${gmp}.tar.gz ${mpf}.tar.bz2 ${mpc}.tar.gz ; do case "$i" in *.bz2) tar jxf ${dist}/"$i";; *.gz) tar zxf ${dist}/"$i";; esac; done
        !           206:
        !           207: pushd ${gmp}
        !           208: ./configure --prefix=${LOCAL} --enable-shared --disable-static --disable-cxx
        !           209: make
        !           210: if [ "$MSYSTEM" = MINGW32 ]; then
        !           211:        gcc -shared .libs/*.o */.libs/*.o -m32 -Wl,--export-all-symbols -Wl,--output-def -Wl,.libs/libgmp-3.dll.def -o .libs/libgmp-10.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgmp.dll.
        !           212: a
        !           213: fi
        !           214: make install
        !           215: (cd .libs; gendef libgmp-10.dll; cp -p libgmp-10.def ${LOCAL}/bin)
        !           216: popd
        !           217:
        !           218: pushd ${mpf}
        !           219: ./configure --prefix=${LOCAL} --enable-shared --disable-static --with-gmp=${LOCAL} --disable-thread-safe
        !           220: make
        !           221: if [ "$MSYSTEM" = MINGW32 ]; then
        !           222:        cd src
        !           223:        gcc -shared .libs/*.o -L${LOCAL}/lib ${LOCAL}/lib/libgmp.dll.a -m32 -Wl,--output-def -Wl,.libs/libmpfr-4.dll.def -o .libs/libmpfr-4.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libmpfr.dll.a
        !           224:        cd ..
        !           225: fi
        !           226: make install
        !           227: (cd src/.libs; gendef libmpfr-4.dll; cp -p libmpfr-4.def ${LOCAL}/bin)
        !           228: popd
        !           229:
        !           230: pushd ${mpc}
        !           231: ./configure --prefix=${LOCAL} --enable-shared --disable-static --with-gmp=${LOCAL} --with-mpfr=${LOCAL}
        !           232: make
        !           233: if [ "$MSYSTEM" = MINGW32 ]; then
        !           234:        cd src
        !           235:     gcc -shared .libs/*.o -L${LOCAL}/lib ${LOCAL}/lib/libmpfr.dll.a ${LOCAL}/lib/libgmp.dll.a -m32 -o .libs/libmpc-3.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libmpc.dll.a
        !           236:        cd ..
        !           237: fi
        !           238: make install
        !           239: (cd src/.libs; gendef libmpc-3.dll; cp -p libmpc-3.def ${LOCAL}/bin)
        !           240: popd
        !           241:
        !           242: C. $BIUO?(B3
        !           243:
1.1       ohara     244: $B%3%^%s%I%W%m%s%W%H>e$G<B9T$9$k%P%C%A%U%!%$%k$G$"$k!#(B
                    245: $B4D6-$K$h$j(B 32bit $B$^$?$O(B 64bit $B$N%i%$%V%i%j$,@8@.$5$l$k$3$H$KCm0U!#(B
                    246:
                    247: @echo off
                    248: lib /def:libmpc-3.def  /out:libmpc-3.lib
                    249: lib /def:libmpfr-4.def /out:libmpfr-4.lib
                    250: lib /def:libgmp-10.def /out:libgmp-10.lib

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>