-
Notifications
You must be signed in to change notification settings - Fork 0
/
windows_build.txt
140 lines (111 loc) · 5.14 KB
/
windows_build.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
Assumptions
===========
The build files for MPIR, MPFR, and MPC only support VS 2010. However, if
VS 2008 is also installed, the "Platform Toolset" setting can be used to select
a specific compiler: v100 = VS 2010, v90 = VS 2008.
Assumes MPIR is placed in c:\src\mpir. (No version number.)
Assumes MPFR is placed in c:\src\mpfr. (No version number.)
Assumes MPC is placed in c:\src\mpc. (No version number.)
Assumes gmpy2 is placed in c:\src\gmpy2. (No version number.)
Assumes vsyasm is installed.
Compiling MPIR
==============
cd c:\src\mpir\build.vc10
python mpir_config.py
# enter 3 (Pentium 3) and 18 (AMD K8)
Start Visual Studio 2010 and open c:\src\mpir\build.vc10\mpir.sln.
Select "Release" and "Win32"
Open "lib_mpir_p3" properties
- Change "Platform Toolset" if needed.
- Change "Character Set" to "Not Set". (Probably not needed.)
- Change "Optimization" to "/O2". (Set uniformly in MPFR and MPC too.)
- Change "Runtime Library" to "Multi-threaded DLL /MD".
- Change "Buffer Security Check" to "No".
Select "Build"
- Ignore preinv* warnings (I think)
- Ignore *_ux and *_sx warnings if using v90 toolset (i.e. VS2008).
Select "Release" and "x64"
Open "lib_mpir_k8" properties
- Change "Platform Toolset" if needed.
- Change "Character Set" to "Not Set". (Probably not needed.)
- Change "Optimization" to "/O2". (Set uniformly in MPFR and MPC too.)
- Change "Runtime Library" to "Multi-threaded DLL /MD".
- Change "Buffer Security Check" to "No".
Select "Build"
- Ignore preinv* warnings (I think)
- Ignore *_ux and *_sx warnings if using v90 toolset (i.e. VS2008).
Compiling MPFR
==============
Start Visual Studio 2010 and open c:\src\mpfr\build.vc10\lib_mpfr.sln.
Select "Release" and "Win32"
Open "lib_mpfr" properties
- Change "Platform Toolset: if needed.
- Change settings to match MPIR except "Enable Fiber-Safe Optimizations" should
be set.
Select "Build"
Select "Release" and "x64"
Open "lib_mpfr" properties
- Change "Platform Toolset: if needed.
- Change settings to match MPIR except "Enable Fiber-Safe Optimizations" should
be set.
Select "Build"
Compiling MPC
=============
Start Visual Studio 2010 and open c:\src\mpfr\build.vc10\mpc.sln.
Select "Release" and "Win32"
Open "mpc_lib" properties
- Change "Platform Toolset: if needed.
- Change remaining settings to match MPIR.
Select "Build"
Select "Release" and "x64"
Open "lib_mpfr" properties
- Change "Platform Toolset: if needed.
- Change remaining settings to match MPIR.
Select "Build"
Copy the library files
======================
The header files will be copied c:\src\BB\vsNNNN\include and the library files
will be copied to c:\src\BB\vsNNNN\lib where BB is 32 or 64, and NNNN is 2008
or 2010.
32-bit, VS 2008
cd c:\src
xcopy /y c:\src\mpir\lib\Win32\Release\*.h c:\src\32\vs2008\include\
xcopy /y c:\src\mpir\lib\Win32\Release\*.lib c:\src\32\vs2008\lib\
xcopy /y c:\src\mpfr\lib\Win32\Release\*.h c:\src\32\vs2008\include\
xcopy /y c:\src\mpfr\lib\Win32\Release\*.lib c:\src\32\vs2008\lib\
xcopy /y c:\src\mpc\lib\Win32\Release\*.h c:\src\32\vs2008\include\
xcopy /y c:\src\mpc\lib\Win32\Release\*.lib c:\src\32\vs2008\lib\
64-bit, VS 2008
cd c:\src
xcopy /y c:\src\mpir\lib\x64\Release\*.h c:\src\64\vs2008\include\
xcopy /y c:\src\mpir\lib\x64\Release\*.lib c:\src\64\vs2008\lib\
xcopy /y c:\src\mpfr\lib\x64\Release\*.h c:\src\64\vs2008\include\
xcopy /y c:\src\mpfr\lib\x64\Release\*.lib c:\src\64\vs2008\lib\
xcopy /y c:\src\mpc\lib\x64\Release\*.h c:\src\64\vs2008\include\
xcopy /y c:\src\mpc\lib\x64\Release\*.lib c:\src\64\vs2008\lib\
32-bit, VS 2010
cd c:\src
xcopy /y c:\src\mpir\lib\Win32\Release\*.h c:\src\32\vs2010\include\
xcopy /y c:\src\mpir\lib\Win32\Release\*.lib c:\src\32\vs2010\lib\
xcopy /y c:\src\mpfr\lib\Win32\Release\*.h c:\src\32\vs2010\include\
xcopy /y c:\src\mpfr\lib\Win32\Release\*.lib c:\src\32\vs2010\lib\
xcopy /y c:\src\mpc\lib\Win32\Release\*.h c:\src\32\vs2010\include\
xcopy /y c:\src\mpc\lib\Win32\Release\*.lib c:\src\32\vs2010\lib\
64-bit, VS 2010
cd c:\src
xcopy /y c:\src\mpir\lib\x64\Release\*.h c:\src\64\vs2010\include\
xcopy /y c:\src\mpir\lib\x64\Release\*.lib c:\src\64\vs2010\lib\
xcopy /y c:\src\mpfr\lib\x64\Release\*.h c:\src\64\vs2010\include\
xcopy /y c:\src\mpfr\lib\x64\Release\*.lib c:\src\64\vs2010\lib\
xcopy /y c:\src\mpc\lib\x64\Release\*.h c:\src\64\vs2010\include\
xcopy /y c:\src\mpc\lib\x64\Release\*.lib c:\src\64\vs2010\lib\
Compile gmpy2
=============
c:\32\Python26\python.exe setup.py build_ext -f -Ddir=c:\src\32\vs2008 bdist_wininst
c:\32\Python27\python.exe setup.py build_ext -f -Ddir=c:\src\32\vs2008 bdist_wininst
c:\32\Python32\python.exe setup.py build_ext -f -Ddir=c:\src\32\vs2008 bdist_wininst
c:\32\Python33\python.exe setup.py build_ext -f -Ddir=c:\src\32\vs2010 bdist_wininst
c:\64\Python26\python.exe setup.py build_ext -f -Ddir=c:\src\64\vs2008 bdist_wininst
c:\64\Python27\python.exe setup.py build_ext -f -Ddir=c:\src\64\vs2008 bdist_wininst
c:\64\Python32\python.exe setup.py build_ext -f -Ddir=c:\src\64\vs2008 bdist_wininst
c:\64\Python33\python.exe setup.py build_ext -f -Ddir=c:\src\64\vs2010 bdist_wininst