This file is indexed.

/usr/share/doc/libav-tools/html/platform.html is in libav-tools 4:0.8.17-0ubuntu0.12.04.2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on April 1, 2016 by texi2html 1.82 -->
<!--
texi2html was written by: 
            Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>

-->
<head>
<title>Libav documentation : : </title>

<meta name="description" content=": ">
<meta name="keywords" content="Libav documentation : : ">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">

<style type="text/css">
<!--
a.summary-letter { text-decoration: none }
a { color: #2D6198; }
a:visited { color: #884488; }
h1 a, h2 a, h3 a { text-decoration: inherit; color: inherit; }
p { margin-left: 1em; margin-right: 1em; }
table { margin-left: 2em; }
pre { margin-left: 2em; }
#footer { text-align: center; }
#body { margin-left: 1em; margin-right: 1em; }
body { background-color: #313131; margin: 0; }

#container {
    background-color: white;
    color: #202020;
    margin-left: 1em;
    margin-right: 1em;
}

h1 {
    background-color: #7BB37B;
    border: 1px solid #6A996A;
    color: #151515;
    font-size: 1.2em;
    padding-bottom: 0.2em;
    padding-left: 0.4em;
    padding-top: 0.2em;
}

h2 {
    color: #313131;
    font-size: 1.2em;
}

h3 {
    color: #313131;
    font-size: 0.8em;
    margin-bottom: -8px;
}

.note {
    margin: 1em;
    border: 1px solid #bbc9d8;
    background-color: #dde1e1;
}

.important {
    margin: 1em;
    border: 1px solid #d26767;
    background-color: #f8e1e1;
}

-->
</style>

<link rel="icon" href="favicon.png" type="image/png" />
<link rel="stylesheet" type="text/css" href="default.css" />

</head>

<body >
<div id="container">

<div id="body">
<a name="SEC_Top"></a>
<h1 class="settitle">Platform Specific information</h1>

<a name="SEC_Contents"></a>
<h1>Table of Contents</h1>
<div class="contents">

<ul class="toc">
  <li><a name="toc-Unix_002dlike" href="#Unix_002dlike">1. Unix-like</a>
  <ul class="toc">
    <li><a name="toc-BSD" href="#BSD">1.1 BSD</a></li>
    <li><a name="toc-_0028Open_0029Solaris" href="#g_t_0028Open_0029Solaris">1.2 (Open)Solaris</a></li>
    <li><a name="toc-Darwin-_0028OS-X_002c-iPhone_0029" href="#Darwin-_0028OS-X_002c-iPhone_0029">1.3 Darwin (OS X, iPhone)</a></li>
  </ul></li>
  <li><a name="toc-DOS" href="#DOS">2. DOS</a></li>
  <li><a name="toc-OS_002f2" href="#OS_002f2">3. OS/2</a></li>
  <li><a name="toc-Windows" href="#Windows">4. Windows</a>
  <ul class="toc">
    <li><a name="toc-Native-Windows-compilation" href="#Native-Windows-compilation">4.1 Native Windows compilation</a></li>
    <li><a name="toc-Microsoft-Visual-C_002b_002b-compatibility" href="#Microsoft-Visual-C_002b_002b-compatibility">4.2 Microsoft Visual C++ compatibility</a>
    <ul class="toc">
      <li><a name="toc-Using-static-libraries" href="#Using-static-libraries">4.2.1 Using static libraries</a></li>
      <li><a name="toc-Using-shared-libraries" href="#Using-shared-libraries">4.2.2 Using shared libraries</a></li>
    </ul></li>
    <li><a name="toc-Cross-compilation-for-Windows-with-Linux-1" href="#Cross-compilation-for-Windows-with-Linux-1">4.3 Cross compilation for Windows with Linux</a></li>
    <li><a name="toc-Compilation-under-Cygwin" href="#Compilation-under-Cygwin">4.4 Compilation under Cygwin</a></li>
    <li><a name="toc-Crosscompilation-for-Windows-under-Cygwin" href="#Crosscompilation-for-Windows-under-Cygwin">4.5 Crosscompilation for Windows under Cygwin</a></li>
  </ul>
</li>
</ul>
</div>

<a name="Unix_002dlike"></a>
<h1 class="chapter"><a href="platform.html#toc-Unix_002dlike">1. Unix-like</a></h1>

<p>Some parts of Libav cannot be built with version 2.15 of the GNU
assembler which is still provided by a few AMD64 distributions. To
make sure your compiler really uses the required version of gas
after a binutils upgrade, run:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">$(gcc -print-prog-name=as) --version
</pre></td></tr></table>

<p>If not, then you should install a different compiler that has no
hard-coded path to gas. In the worst case pass <code>--disable-asm</code>
to configure.
</p>
<a name="BSD"></a>
<h2 class="section"><a href="platform.html#toc-BSD">1.1 BSD</a></h2>

<p>BSD make will not build Libav, you need to install and use GNU Make
(&lsquo;<tt>gmake</tt>&rsquo;).
</p>
<a name="g_t_0028Open_0029Solaris"></a>
<h2 class="section"><a href="platform.html#toc-_0028Open_0029Solaris">1.2 (Open)Solaris</a></h2>

<p>GNU Make is required to build Libav, so you have to invoke (&lsquo;<tt>gmake</tt>&rsquo;),
standard Solaris Make will not work. When building with a non-c99 front-end
(gcc, generic suncc) add either <code>--extra-libs=/usr/lib/values-xpg6.o</code>
or <code>--extra-libs=/usr/lib/64/values-xpg6.o</code> to the configure options
since the libc is not c99-compliant by default. The probes performed by
configure may raise an exception leading to the death of configure itself
due to a bug in the system shell. Simply invoke a different shell such as
bash directly to work around this:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">bash ./configure
</pre></td></tr></table>

<p><a name="Darwin"></a>
</p><a name="Darwin-_0028OS-X_002c-iPhone_0029"></a>
<h2 class="section"><a href="platform.html#toc-Darwin-_0028OS-X_002c-iPhone_0029">1.3 Darwin (OS X, iPhone)</a></h2>

<p>The toolchain provided with Xcode is sufficient to build the basic
unacelerated code.
</p>
<p>OS X on PowerPC or ARM (iPhone) requires a preprocessor from
<a href="git://git.libav.org/gas-preprocessor.git">git://git.libav.org/gas-preprocessor.git</a> to build the optimized
assembler functions. Put the Perl script somewhere
in your PATH, Libav&rsquo;s configure will pick it up automatically.
</p>
<p>OS X on AMD64 and x86 requires <code>yasm</code> to build most of the
optimized assembler functions <a href="http://mxcl.github.com/homebrew/">Homebrew</a>,
<a href="http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml">Gentoo Prefix</a>
or <a href="http://www.macports.org">MacPorts</a> can easily provide it.
</p>

<a name="DOS"></a>
<h1 class="chapter"><a href="platform.html#toc-DOS">2. DOS</a></h1>

<p>Using a cross-compiler is preferred for various reasons.
<a href="http://www.delorie.com/howto/djgpp/linux-x-djgpp.html">http://www.delorie.com/howto/djgpp/linux-x-djgpp.html</a>
</p>

<a name="OS_002f2"></a>
<h1 class="chapter"><a href="platform.html#toc-OS_002f2">3. OS/2</a></h1>

<p>For information about compiling Libav on OS/2 see
<a href="http://www.edm2.com/index.php/FFmpeg">http://www.edm2.com/index.php/FFmpeg</a>.
</p>

<a name="Windows"></a>
<h1 class="chapter"><a href="platform.html#toc-Windows">4. Windows</a></h1>

<a name="Native-Windows-compilation"></a>
<h2 class="section"><a href="platform.html#toc-Native-Windows-compilation">4.1 Native Windows compilation</a></h2>

<p>Libav can be built to run natively on Windows using the MinGW tools. Install
the latest versions of MSYS and MinGW from <a href="http://www.mingw.org/">http://www.mingw.org/</a>.
You can find detailed installation
instructions in the download section and the FAQ.
</p>
<p>Libav does not build out-of-the-box with the packages the automated MinGW
installer provides. It also requires coreutils to be installed and many other
packages updated to the latest version. The minimum version for some packages
are listed below:
</p>
<ul>
<li> bash 3.1
</li><li> msys-make 3.81-2 (note: not mingw32-make)
</li><li> w32api 3.13
</li><li> mingw-runtime 3.15
</li></ul>

<p>Libav automatically passes <code>-fno-common</code> to the compiler to work around
a GCC bug (see <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216</a>).
</p>
<p>Notes:
</p>
<ul>
<li> Building natively using MSYS can be sped up by disabling implicit rules
in the Makefile by calling <code>make -r</code> instead of plain <code>make</code>. This
speed up is close to non-existent for normal one-off builds and is only
noticeable when running make for a second time (for example in
<code>make install</code>).

</li><li> In order to compile AVplay, you must have the MinGW development library
of <a href="http://www.libsdl.org/">SDL</a>.
Edit the &lsquo;<tt>bin/sdl-config</tt>&rsquo; script so that it points to the correct prefix
where SDL was installed. Verify that &lsquo;<tt>sdl-config</tt>&rsquo; can be launched from
the MSYS command line.

</li><li> By using <code>./configure --enable-shared</code> when configuring Libav,
you can build libavutil, libavcodec and libavformat as DLLs.

</li></ul>

<a name="Microsoft-Visual-C_002b_002b-compatibility"></a>
<h2 class="section"><a href="platform.html#toc-Microsoft-Visual-C_002b_002b-compatibility">4.2 Microsoft Visual C++ compatibility</a></h2>

<p>As stated in the FAQ, Libav will not compile under MSVC++. However, if you
want to use the libav* libraries in your own applications, you can still
compile those applications using MSVC++. But the libav* libraries you link
to <em>must</em> be built with MinGW. However, you will not be able to debug
inside the libav* libraries, since MSVC++ does not recognize the debug
symbols generated by GCC.
We strongly recommend you to move over from MSVC++ to MinGW tools.
</p>
<p>This description of how to use the Libav libraries with MSVC++ is based on
Microsoft Visual C++ 2005 Express Edition. If you have a different version,
you might have to modify the procedures slightly.
</p>
<a name="Using-static-libraries"></a>
<h3 class="subsection"><a href="platform.html#toc-Using-static-libraries">4.2.1 Using static libraries</a></h3>

<p>Assuming you have just built and installed Libav in &lsquo;<tt>/usr/local</tt>&rsquo;.
</p>
<ol>
<li> Create a new console application (&quot;File / New / Project&quot;) and then
select &quot;Win32 Console Application&quot;. On the appropriate page of the
Application Wizard, uncheck the &quot;Precompiled headers&quot; option.

</li><li> Write the source code for your application, or, for testing, just
copy the code from an existing sample application into the source file
that MSVC++ has already created for you. For example, you can copy
&lsquo;<tt>libavformat/output-example.c</tt>&rsquo; from the Libav distribution.

</li><li> Open the &quot;Project / Properties&quot; dialog box. In the &quot;Configuration&quot;
combo box, select &quot;All Configurations&quot; so that the changes you make will
affect both debug and release builds. In the tree view on the left hand
side, select &quot;C/C++ / General&quot;, then edit the &quot;Additional Include
Directories&quot; setting to contain the path where the Libav includes were
installed (i.e. &lsquo;<tt>c:\msys\1.0\local\include</tt>&rsquo;).
Do not add MinGW&rsquo;s include directory here, or the include files will
conflict with MSVC&rsquo;s.

</li><li> Still in the &quot;Project / Properties&quot; dialog box, select
&quot;Linker / General&quot; from the tree view and edit the
&quot;Additional Library Directories&quot; setting to contain the &lsquo;<tt>lib</tt>&rsquo;
directory where Libav was installed (i.e. &lsquo;<tt>c:\msys\1.0\local\lib</tt>&rsquo;),
the directory where MinGW libs are installed (i.e. &lsquo;<tt>c:\mingw\lib</tt>&rsquo;),
and the directory where MinGW&rsquo;s GCC libs are installed
(i.e. &lsquo;<tt>C:\mingw\lib\gcc\mingw32\4.2.1-sjlj</tt>&rsquo;). Then select
&quot;Linker / Input&quot; from the tree view, and add the files &lsquo;<tt>libavformat.a</tt>&rsquo;,
&lsquo;<tt>libavcodec.a</tt>&rsquo;, &lsquo;<tt>libavutil.a</tt>&rsquo;, &lsquo;<tt>libmingwex.a</tt>&rsquo;,
&lsquo;<tt>libgcc.a</tt>&rsquo;, and any other libraries you used (i.e. &lsquo;<tt>libz.a</tt>&rsquo;)
to the end of &quot;Additional Dependencies&quot;.

</li><li> Now, select &quot;C/C++ / Code Generation&quot; from the tree view. Select
&quot;Debug&quot; in the &quot;Configuration&quot; combo box. Make sure that &quot;Runtime
Library&quot; is set to &quot;Multi-threaded Debug DLL&quot;. Then, select &quot;Release&quot; in
the &quot;Configuration&quot; combo box and make sure that &quot;Runtime Library&quot; is
set to &quot;Multi-threaded DLL&quot;.

</li><li> Click &quot;OK&quot; to close the &quot;Project / Properties&quot; dialog box.

</li><li> MSVC++ lacks some C99 header files that are fundamental for Libav.
Get msinttypes from <a href="http://code.google.com/p/msinttypes/downloads/list">http://code.google.com/p/msinttypes/downloads/list</a>
and install it in MSVC++&rsquo;s include directory
(i.e. &lsquo;<tt>C:\Program Files\Microsoft Visual Studio 8\VC\include</tt>&rsquo;).

</li><li> MSVC++ also does not understand the <code>inline</code> keyword used by
Libav, so you must add this line before <code>#include</code>ing libav*:
<table><tr><td>&nbsp;</td><td><pre class="example">#define inline _inline
</pre></td></tr></table>

</li><li> Build your application, everything should work.

</li></ol>

<a name="Using-shared-libraries"></a>
<h3 class="subsection"><a href="platform.html#toc-Using-shared-libraries">4.2.2 Using shared libraries</a></h3>

<p>This is how to create DLL and LIB files that are compatible with MSVC++:
</p>
<p>Within the MSYS shell, build Libav with
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">./configure --enable-shared
make
make install
</pre></td></tr></table>

<p>Your install path (&lsquo;<tt>/usr/local/</tt>&rsquo; by default) should now have the
necessary DLL and LIB files under the &lsquo;<tt>bin</tt>&rsquo; directory.
</p>
<p>Alternatively, build the libraries with a cross compiler, according to
the instructions below in <a href="#Cross-compilation-for-Windows-with-Linux">Cross compilation for Windows with Linux</a>.
</p>
<p>To use those files with MSVC++, do the same as you would do with
the static libraries, as described above. But in Step 4,
you should only need to add the directory where the LIB files are installed
(i.e. &lsquo;<tt>c:\msys\usr\local\bin</tt>&rsquo;). This is not a typo, the LIB files are
installed in the &lsquo;<tt>bin</tt>&rsquo; directory. And instead of adding the static
libraries (&lsquo;<tt>libxxx.a</tt>&rsquo; files) you should add the MSVC import libraries
(&lsquo;<tt>avcodec.lib</tt>&rsquo;, &lsquo;<tt>avformat.lib</tt>&rsquo;, and
&lsquo;<tt>avutil.lib</tt>&rsquo;). Note that you should not use the GCC import
libraries (&lsquo;<tt>libxxx.dll.a</tt>&rsquo; files), as these will give you undefined
reference errors. There should be no need for &lsquo;<tt>libmingwex.a</tt>&rsquo;,
&lsquo;<tt>libgcc.a</tt>&rsquo;, and &lsquo;<tt>wsock32.lib</tt>&rsquo;, nor any other external library
statically linked into the DLLs.
</p>
<p>Libav headers do not declare global data for Windows DLLs through the usual
dllexport/dllimport interface. Such data will be exported properly while
building, but to use them in your MSVC++ code you will have to edit the
appropriate headers and mark the data as dllimport. For example, in
libavutil/pixdesc.h you should have:
</p><table><tr><td>&nbsp;</td><td><pre class="example">extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[];
</pre></td></tr></table>

<p>Note that using import libraries created by dlltool requires
the linker optimization option to be set to
&quot;References: Keep Unreferenced Data (<code>/OPT:NOREF</code>)&quot;, otherwise
the resulting binaries will fail during runtime. This isn&rsquo;t
required when using import libraries generated by lib.exe.
This issue is reported upstream at
<a href="http://sourceware.org/bugzilla/show_bug.cgi?id=12633">http://sourceware.org/bugzilla/show_bug.cgi?id=12633</a>.
</p>
<p>To create import libraries that work with the <code>/OPT:REF</code> option
(which is enabled by default in Release mode), follow these steps:
</p>
<ol>
<li> Open &lsquo;<tt>Visual Studio 2005 Command Prompt</tt>&rsquo;.

<p>Alternatively, in a normal command line prompt, call &lsquo;<tt>vcvars32.bat</tt>&rsquo;
which sets up the environment variables for the Visual C++ tools
(the standard location for this file is
&lsquo;<tt>C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat</tt>&rsquo;).
</p>
</li><li> Enter the &lsquo;<tt>bin</tt>&rsquo; directory where the created LIB and DLL files
are stored.

</li><li> Generate new import libraries with &lsquo;<tt>lib.exe</tt>&rsquo;:

<table><tr><td>&nbsp;</td><td><pre class="example">lib /machine:i386 /def:..\lib\avcodec-53.def  /out:avcodec.lib
lib /machine:i386 /def:..\lib\avdevice-53.def /out:avdevice.lib
lib /machine:i386 /def:..\lib\avfilter-2.def  /out:avfilter.lib
lib /machine:i386 /def:..\lib\avformat-53.def /out:avformat.lib
lib /machine:i386 /def:..\lib\avutil-51.def   /out:avutil.lib
lib /machine:i386 /def:..\lib\swscale-2.def   /out:swscale.lib
</pre></td></tr></table>

</li></ol>

<p><a name="Cross-compilation-for-Windows-with-Linux"></a>
</p><a name="Cross-compilation-for-Windows-with-Linux-1"></a>
<h2 class="section"><a href="platform.html#toc-Cross-compilation-for-Windows-with-Linux-1">4.3 Cross compilation for Windows with Linux</a></h2>

<p>You must use the MinGW cross compilation tools available at
<a href="http://www.mingw.org/">http://www.mingw.org/</a>.
</p>
<p>Then configure Libav with the following options:
</p><table><tr><td>&nbsp;</td><td><pre class="example">./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
</pre></td></tr></table>
<p>(you can change the cross-prefix according to the prefix chosen for the
MinGW tools).
</p>
<p>Then you can easily test Libav with <a href="http://www.winehq.com/">Wine</a>.
</p>
<a name="Compilation-under-Cygwin"></a>
<h2 class="section"><a href="platform.html#toc-Compilation-under-Cygwin">4.4 Compilation under Cygwin</a></h2>

<p>Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack
llrint() in its C library.
</p>
<p>Install your Cygwin with all the &quot;Base&quot; packages, plus the
following &quot;Devel&quot; ones:
</p><table><tr><td>&nbsp;</td><td><pre class="example">binutils, gcc4-core, make, git, mingw-runtime, texi2html
</pre></td></tr></table>

<p>And the following &quot;Utils&quot; one:
</p><table><tr><td>&nbsp;</td><td><pre class="example">diffutils
</pre></td></tr></table>

<p>Then run
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">./configure
</pre></td></tr></table>

<p>to make a static build.
</p>
<p>The current <code>gcc4-core</code> package is buggy and needs this flag to build
shared libraries:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">./configure --enable-shared --disable-static --extra-cflags=-fno-reorder-functions
</pre></td></tr></table>

<p>If you want to build Libav with additional libraries, download Cygwin
&quot;Devel&quot; packages for Ogg and Vorbis from any Cygwin packages repository:
</p><table><tr><td>&nbsp;</td><td><pre class="example">libogg-devel, libvorbis-devel
</pre></td></tr></table>

<p>These library packages are only available from
<a href="http://sourceware.org/cygwinports/">Cygwin Ports</a>:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">yasm, libSDL-devel, libdirac-devel, libfaac-devel, libgsm-devel,
libmp3lame-devel, libschroedinger1.0-devel, speex-devel, libtheora-devel,
libxvidcore-devel
</pre></td></tr></table>

<p>The recommendation for libnut and x264 is to build them from source by
yourself, as they evolve too quickly for Cygwin Ports to be up to date.
</p>
<p>Cygwin 1.7.x has IPv6 support. You can add IPv6 to Cygwin 1.5.x by means
of the <code>libgetaddrinfo-devel</code> package, available at Cygwin Ports.
</p>
<a name="Crosscompilation-for-Windows-under-Cygwin"></a>
<h2 class="section"><a href="platform.html#toc-Crosscompilation-for-Windows-under-Cygwin">4.5 Crosscompilation for Windows under Cygwin</a></h2>

<p>With Cygwin you can create Windows binaries that do not need the cygwin1.dll.
</p>
<p>Just install your Cygwin as explained before, plus these additional
&quot;Devel&quot; packages:
</p><table><tr><td>&nbsp;</td><td><pre class="example">gcc-mingw-core, mingw-runtime, mingw-zlib
</pre></td></tr></table>

<p>and add some special flags to your configure invocation.
</p>
<p>For a static build run
</p><table><tr><td>&nbsp;</td><td><pre class="example">./configure --target-os=mingw32 --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
</pre></td></tr></table>

<p>and for a build with shared libraries
</p><table><tr><td>&nbsp;</td><td><pre class="example">./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
</pre></td></tr></table>

<div id="footer">
<p>
 <font size="-1">
  This document was generated by <em>Build Daemon user</em> on <em>April 1, 2016</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
 </font>
 <br>
</div></div>
</p>
</body>
</html>
</div>