502 lines
22 KiB
HTML
502 lines
22 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
|
|
<html>
|
|
<!-- Created on January 27, 2012 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>FFmpeg documentation : : </title>
|
|
|
|
<meta name="description" content=": ">
|
|
<meta name="keywords" content="FFmpeg 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-_0028Mac-OS-X_002c-iPhone_0029" href="#Darwin-_0028Mac-OS-X_002c-iPhone_0029">1.3 Darwin (Mac 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 FFmpeg 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> </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 FFmpeg, you need to install and use GNU Make
|
|
(‘<tt>gmake</tt>’).
|
|
</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 FFmpeg, so you have to invoke (‘<tt>gmake</tt>’),
|
|
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> </td><td><pre class="example">bash ./configure
|
|
</pre></td></tr></table>
|
|
|
|
<p><a name="Darwin"></a>
|
|
</p><a name="Darwin-_0028Mac-OS-X_002c-iPhone_0029"></a>
|
|
<h2 class="section"><a href="platform.html#toc-Darwin-_0028Mac-OS-X_002c-iPhone_0029">1.3 Darwin (Mac OS X, iPhone)</a></h2>
|
|
|
|
<p>The toolchain provided with Xcode is sufficient to build the basic
|
|
unacelerated code.
|
|
</p>
|
|
<p>Mac OS X on PowerPC or ARM (iPhone) requires a preprocessor from
|
|
<a href="http://github.com/yuvi/gas-preprocessor">http://github.com/yuvi/gas-preprocessor</a> to build the optimized
|
|
assembler functions. Just download the Perl script and put it somewhere
|
|
in your PATH, FFmpeg’s configure will pick it up automatically.
|
|
</p>
|
|
<p>Mac OS X on amd64 and x86 requires <code>yasm</code> to build most of the
|
|
optimized assembler functions. <a href="http://www.finkproject.org/">Fink</a>,
|
|
<a href="http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml">Gentoo Prefix</a>,
|
|
<a href="http://mxcl.github.com/homebrew/">Homebrew</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 FFmpeg 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>
|
|
|
|
<p>To get help and instructions for building FFmpeg under Windows, check out
|
|
the FFmpeg Windows Help Forum at
|
|
<a href="http://ffmpeg.arrozcru.org/">http://ffmpeg.arrozcru.org/</a>.
|
|
</p>
|
|
<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>FFmpeg 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>FFmpeg 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>FFmpeg 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 FFplay, you must have the MinGW development library
|
|
of <a href="http://www.libsdl.org/">SDL</a>.
|
|
Edit the ‘<tt>bin/sdl-config</tt>’ script so that it points to the correct prefix
|
|
where SDL was installed. Verify that ‘<tt>sdl-config</tt>’ can be launched from
|
|
the MSYS command line.
|
|
|
|
</li><li> By using <code>./configure --enable-shared</code> when configuring FFmpeg,
|
|
you can build the FFmpeg libraries (e.g. libavutil, libavcodec,
|
|
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, FFmpeg 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 FFmpeg 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 FFmpeg in ‘<tt>/usr/local</tt>’.
|
|
</p>
|
|
<ol>
|
|
<li> Create a new console application ("File / New / Project") and then
|
|
select "Win32 Console Application". On the appropriate page of the
|
|
Application Wizard, uncheck the "Precompiled headers" 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
|
|
‘<tt>libavformat/output-example.c</tt>’ from the FFmpeg distribution.
|
|
|
|
</li><li> Open the "Project / Properties" dialog box. In the "Configuration"
|
|
combo box, select "All Configurations" so that the changes you make will
|
|
affect both debug and release builds. In the tree view on the left hand
|
|
side, select "C/C++ / General", then edit the "Additional Include
|
|
Directories" setting to contain the path where the FFmpeg includes were
|
|
installed (i.e. ‘<tt>c:\msys\1.0\local\include</tt>’).
|
|
Do not add MinGW’s include directory here, or the include files will
|
|
conflict with MSVC’s.
|
|
|
|
</li><li> Still in the "Project / Properties" dialog box, select
|
|
"Linker / General" from the tree view and edit the
|
|
"Additional Library Directories" setting to contain the ‘<tt>lib</tt>’
|
|
directory where FFmpeg was installed (i.e. ‘<tt>c:\msys\1.0\local\lib</tt>’),
|
|
the directory where MinGW libs are installed (i.e. ‘<tt>c:\mingw\lib</tt>’),
|
|
and the directory where MinGW’s GCC libs are installed
|
|
(i.e. ‘<tt>C:\mingw\lib\gcc\mingw32\4.2.1-sjlj</tt>’). Then select
|
|
"Linker / Input" from the tree view, and add the files ‘<tt>libavformat.a</tt>’,
|
|
‘<tt>libavcodec.a</tt>’, ‘<tt>libavutil.a</tt>’, ‘<tt>libmingwex.a</tt>’,
|
|
‘<tt>libgcc.a</tt>’, and any other libraries you used (i.e. ‘<tt>libz.a</tt>’)
|
|
to the end of "Additional Dependencies".
|
|
|
|
</li><li> Now, select "C/C++ / Code Generation" from the tree view. Select
|
|
"Debug" in the "Configuration" combo box. Make sure that "Runtime
|
|
Library" is set to "Multi-threaded Debug DLL". Then, select "Release" in
|
|
the "Configuration" combo box and make sure that "Runtime Library" is
|
|
set to "Multi-threaded DLL".
|
|
|
|
</li><li> Click "OK" to close the "Project / Properties" dialog box.
|
|
|
|
</li><li> MSVC++ lacks some C99 header files that are fundamental for FFmpeg.
|
|
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++’s include directory
|
|
(i.e. ‘<tt>C:\Program Files\Microsoft Visual Studio 8\VC\include</tt>’).
|
|
|
|
</li><li> MSVC++ also does not understand the <code>inline</code> keyword used by
|
|
FFmpeg, so you must add this line before <code>#include</code>ing libav*:
|
|
<table><tr><td> </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>
|
|
<ol>
|
|
<li> Add a call to ‘<tt>vcvars32.bat</tt>’ (which sets up the environment
|
|
variables for the Visual C++ tools) as the first line of ‘<tt>msys.bat</tt>’.
|
|
The standard location for ‘<tt>vcvars32.bat</tt>’ is
|
|
‘<tt>C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat</tt>’,
|
|
and the standard location for ‘<tt>msys.bat</tt>’ is ‘<tt>C:\msys\1.0\msys.bat</tt>’.
|
|
If this corresponds to your setup, add the following line as the first line
|
|
of ‘<tt>msys.bat</tt>’:
|
|
|
|
<table><tr><td> </td><td><pre class="example">call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
|
|
</pre></td></tr></table>
|
|
|
|
<p>Alternatively, you may start the ‘<tt>Visual Studio 2005 Command Prompt</tt>’,
|
|
and run ‘<tt>c:\msys\1.0\msys.bat</tt>’ from there.
|
|
</p>
|
|
</li><li> Within the MSYS shell, run <code>lib.exe</code>. If you get a help message
|
|
from ‘<tt>Microsoft (R) Library Manager</tt>’, this means your environment
|
|
variables are set up correctly, the ‘<tt>Microsoft (R) Library Manager</tt>’
|
|
is on the path and will be used by FFmpeg to create
|
|
MSVC++-compatible import libraries.
|
|
|
|
</li><li> Build FFmpeg with
|
|
|
|
<table><tr><td> </td><td><pre class="example">./configure --enable-shared
|
|
make
|
|
make install
|
|
</pre></td></tr></table>
|
|
|
|
<p>Your install path (‘<tt>/usr/local/</tt>’ by default) should now have the
|
|
necessary DLL and LIB files under the ‘<tt>bin</tt>’ directory.
|
|
</p>
|
|
</li></ol>
|
|
|
|
<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. ‘<tt>c:\msys\usr\local\bin</tt>’). This is not a typo, the LIB files are
|
|
installed in the ‘<tt>bin</tt>’ directory. And instead of adding the static
|
|
libraries (‘<tt>libxxx.a</tt>’ files) you should add the MSVC import libraries
|
|
(‘<tt>avcodec.lib</tt>’, ‘<tt>avformat.lib</tt>’, and
|
|
‘<tt>avutil.lib</tt>’). Note that you should not use the GCC import
|
|
libraries (‘<tt>libxxx.dll.a</tt>’ files), as these will give you undefined
|
|
reference errors. There should be no need for ‘<tt>libmingwex.a</tt>’,
|
|
‘<tt>libgcc.a</tt>’, and ‘<tt>wsock32.lib</tt>’, nor any other external library
|
|
statically linked into the DLLs.
|
|
</p>
|
|
<p>FFmpeg 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> </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
|
|
"References: Keep Unreferenced Data (<code>/OPT:NOREF</code>)", otherwise
|
|
the resulting binaries will fail during runtime. This isn’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 ‘<tt>Visual Studio 2005 Command Prompt</tt>’.
|
|
|
|
<p>Alternatively, in a normal command line prompt, call ‘<tt>vcvars32.bat</tt>’
|
|
which sets up the environment variables for the Visual C++ tools
|
|
(the standard location for this file is
|
|
‘<tt>C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat</tt>’).
|
|
</p>
|
|
</li><li> Enter the ‘<tt>bin</tt>’ directory where the created LIB and DLL files
|
|
are stored.
|
|
|
|
</li><li> Generate new import libraries with ‘<tt>lib.exe</tt>’:
|
|
|
|
<table><tr><td> </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 FFmpeg with the following options:
|
|
</p><table><tr><td> </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 FFmpeg 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 "Base" packages, plus the
|
|
following "Devel" ones:
|
|
</p><table><tr><td> </td><td><pre class="example">binutils, gcc4-core, make, git, mingw-runtime, texi2html
|
|
</pre></td></tr></table>
|
|
|
|
<p>And the following "Utils" one:
|
|
</p><table><tr><td> </td><td><pre class="example">diffutils
|
|
</pre></td></tr></table>
|
|
|
|
<p>Then run
|
|
</p>
|
|
<table><tr><td> </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> </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 FFmpeg with additional libraries, download Cygwin
|
|
"Devel" packages for Ogg and Vorbis from any Cygwin packages repository:
|
|
</p><table><tr><td> </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> </td><td><pre class="example">yasm, libSDL-devel, libdirac-devel, libfaac-devel, libaacplus-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
|
|
"Devel" packages:
|
|
</p><table><tr><td> </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> </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> </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>Kyle</em> on <em>January 27, 2012</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
|
|
</font>
|
|
<br>
|
|
</div></div>
|
|
</p>
|
|
</body>
|
|
</html>
|
|
</div>
|