Repository navigation
Expand file tree
/
Copy pathbuilding.html
More file actions
261 lines (225 loc) · 6.41 KB
/
Copy pathbuilding.html
File metadata and controls
261 lines (225 loc) · 6.41 KB
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<title>Building QuickFIX</title>
</head>
<body>
<div class='header'>
<div class='headertitle'>
Building QuickFIX
</div>
</div>
<div class='contents'>
<h1>Building with CMake (Recommended)</h1>
<p>QuickFIX uses CMake as its primary build system, providing consistent builds across all platforms.</p>
<h2>Prerequisites</h2>
<ul>
<li>C++17 compatible compiler (GCC 7+, Clang 5+, MSVC 2017+)</li>
<li>CMake 3.5 or higher</li>
<li>Optional: OpenSSL for SSL/TLS support</li>
<li>Optional: MySQL, PostgreSQL, or ODBC client libraries</li>
</ul>
<h2>Windows</h2>
<p><b>Basic Build:</b></p>
<pre class='fragment'>
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 ..
cmake --build . --config Release
cmake --install . --config Release
</pre>
<p><b>With SSL Support:</b></p>
<pre class='fragment'>
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 ^
-DHAVE_SSL=ON ^
-DOPENSSL_ROOT_DIR="C:\path\to\openssl" ^
-DCMAKE_INSTALL_PREFIX="C:\quickfix" ..
cmake --build . --config Release
cmake --install . --config Release
</pre>
<p><b>With Database Support:</b></p>
<pre class='fragment'>
cmake -G "Visual Studio 17 2022" -A x64 ^
-DHAVE_MYSQL=ON ^
-DHAVE_POSTGRESQL=ON ^
-DHAVE_ODBC=ON ..
cmake --build . --config Release
</pre>
<p>Supported Visual Studio versions: VS 2017, VS 2019, VS 2022</p>
<br/><hr/>
<h2>Linux / macOS</h2>
<p><b>Basic Build:</b></p>
<pre class='fragment'>
cmake -DCMAKE_BUILD_TYPE=Release .
make -j$(nproc)
sudo make install
</pre>
<p><b>With SSL Support:</b></p>
<pre class='fragment'>
cmake -DCMAKE_BUILD_TYPE=Release -DHAVE_SSL=ON .
make -j$(nproc)
sudo make install
</pre>
<p><b>With Database Support:</b></p>
<pre class='fragment'>
cmake -DCMAKE_BUILD_TYPE=Release \
-DHAVE_MYSQL=ON \
-DHAVE_POSTGRESQL=ON .
make -j$(nproc)
sudo make install
</pre>
<p><b>Custom Installation Directory:</b></p>
<pre class='fragment'>
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local .
make -j$(nproc)
sudo make install
</pre>
<h2>CMake Build Options</h2>
<table>
<tr>
<td><b>Option</b></td>
<td><b>Description</b></td>
<td><b>Default</b></td>
</tr>
<tr>
<td><font color="#0000FF">-DHAVE_SSL=ON</font></td>
<td>Enable SSL/TLS support (requires OpenSSL)</td>
<td>OFF</td>
</tr>
<tr>
<td><font color="#0000FF">-DHAVE_MYSQL=ON</font></td>
<td>Enable MySQL message store support</td>
<td>OFF</td>
</tr>
<tr>
<td><font color="#0000FF">-DHAVE_POSTGRESQL=ON</font></td>
<td>Enable PostgreSQL message store support</td>
<td>OFF</td>
</tr>
<tr>
<td><font color="#0000FF">-DHAVE_ODBC=ON</font></td>
<td>Enable ODBC message store support</td>
<td>OFF</td>
</tr>
<tr>
<td><font color="#0000FF">-DHAVE_PYTHON3=ON</font></td>
<td>Build Python 3 bindings</td>
<td>OFF</td>
</tr>
<tr>
<td><font color="#0000FF">-DQUICKFIX_SHARED_LIBS=ON</font></td>
<td>Build shared libraries instead of static</td>
<td>ON</td>
</tr>
<tr>
<td><font color="#0000FF">-DQUICKFIX_EXAMPLES=ON</font></td>
<td>Build example applications</td>
<td>ON</td>
</tr>
<tr>
<td><font color="#0000FF">-DQUICKFIX_TESTS=ON</font></td>
<td>Build test suite</td>
<td>ON</td>
</tr>
<tr>
<td><font color="#0000FF">-DCMAKE_BUILD_TYPE=Release</font></td>
<td>Build type (Debug, Release, RelWithDebInfo)</td>
<td>-</td>
</tr>
<tr>
<td><font color="#0000FF">-DCMAKE_INSTALL_PREFIX=/path</font></td>
<td>Installation directory</td>
<td>/usr/local</td>
</tr>
</table>
<br/><hr/>
<h1>Building with Autotools (Alternative)</h1>
<p>QuickFIX also supports traditional autotools-based builds on Unix-like systems.</p>
<h2>Linux / macOS</h2>
<pre class='fragment'>
./bootstrap
./configure
make
make check
sudo make install
</pre>
<p>You can run configure with the <font color=
"#0000FF">--prefix=<base directory></font> option to
install to a custom location.</p>
<p><b>./configure</b> options:</p>
<table>
<tr>
<td><font color="#0000FF">--prefix=/usr/local</font></td>
</tr>
<tr>
<td>Installation directory</td>
</tr>
<tr>
<td><font color="#0000FF">--with-openssl[=PATH]</font></td>
</tr>
<tr>
<td>Enable SSL support, optionally specify OpenSSL installation path</td>
</tr>
<tr>
<td><font color="#0000FF">--with-python3</font></td>
</tr>
<tr>
<td>Build the Python 3 bindings</td>
</tr>
<tr>
<td><font color="#0000FF">--with-ruby</font></td>
</tr>
<tr>
<td>Build the Ruby bindings</td>
</tr>
<tr>
<td><font color="#0000FF">--with-mysql</font></td>
</tr>
<tr>
<td>Compile with MySQL support</td>
</tr>
<tr>
<td><font color="#0000FF">--with-postgresql</font></td>
</tr>
<tr>
<td>Compile with PostgreSQL support</td>
</tr>
</table>
<br/><hr/>
<h2>Testing Your Build</h2>
<p><b>With CMake:</b></p>
<pre class='fragment'>
cmake --build . --target test
# or
ctest
</pre>
<p><b>With Autotools:</b></p>
<pre class='fragment'>
make check
</pre>
<br/><hr/>
<h2>Using vcpkg</h2>
<p>QuickFIX is available via the vcpkg package manager:</p>
<pre class='fragment'>
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh # Windows: bootstrap-vcpkg.bat
./vcpkg integrate install
./vcpkg install quickfix
</pre>
<br/><hr/>
<h2>Troubleshooting</h2>
<ul>
<li>Ensure your compiler supports C++17</li>
<li>For SSL issues, verify OpenSSL is properly installed and OPENSSL_ROOT_DIR is set correctly</li>
<li>For database support, ensure client libraries are installed and in the library path</li>
<li>On Windows, run CMake from the "Developer Command Prompt for Visual Studio"</li>
<li>Check the GitHub Issues page for known build problems</li>
</ul>
</div>
</body>
</html>