-<a name="Platform-Specific-information"></a>
-<h1 class="chapter"><a href="general.html#toc-Platform-Specific-information">3. Platform Specific information</a></h1>
-
-<a name="DOS"></a>
-<h2 class="section"><a href="general.html#toc-DOS">3.1 DOS</a></h2>
-
-<p>Using a cross-compiler is preferred for various reasons.
-</p>
-<a name="OS_002f2"></a>
-<h2 class="section"><a href="general.html#toc-OS_002f2">3.2 OS/2</a></h2>
-
-<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="Unix_002dlike"></a>
-<h2 class="section"><a href="general.html#toc-Unix_002dlike">3.3 Unix-like</a></h2>
-
-<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>
-<h3 class="subsection"><a href="general.html#toc-BSD">3.3.1 BSD</a></h3>
-
-<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>
-<h3 class="subsection"><a href="general.html#toc-_0028Open_0029Solaris">3.3.2 (Open)Solaris</a></h3>
-
-<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>
-
-<a name="Darwin-_0028MacOS-X_002c-iPhone_0029"></a>
-<h3 class="subsection"><a href="general.html#toc-Darwin-_0028MacOS-X_002c-iPhone_0029">3.3.3 Darwin (MacOS X, iPhone)</a></h3>
-
-<p>MacOS 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>
-<a name="Windows"></a>
-<h2 class="section"><a href="general.html#toc-Windows">3.4 Windows</a></h2>
-
-<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>
-<h3 class="subsection"><a href="general.html#toc-Native-Windows-compilation">3.4.1 Native Windows compilation</a></h3>
-
-<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>
-<h3 class="subsection"><a href="general.html#toc-Microsoft-Visual-C_002b_002b-compatibility">3.4.2 Microsoft Visual C++ compatibility</a></h3>
-
-<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>
-<h4 class="subsubsection"><a href="general.html#toc-Using-static-libraries">3.4.2.1 Using static libraries</a></h4>
-
-<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>
-<h4 class="subsubsection"><a href="general.html#toc-Using-shared-libraries">3.4.2.2 Using shared libraries</a></h4>
-
-<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>
-<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></li></ol>
-<a name="Cross-compilation-for-Windows-with-Linux-1"></a>
-<h3 class="subsection"><a href="general.html#toc-Cross-compilation-for-Windows-with-Linux-1">3.4.3 Cross compilation for Windows with Linux</a></h3>
-
-<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>
-<h3 class="subsection"><a href="general.html#toc-Compilation-under-Cygwin">3.4.4 Compilation under Cygwin</a></h3>
-
-<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, 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>
-<h3 class="subsection"><a href="general.html#toc-Crosscompilation-for-Windows-under-Cygwin">3.4.5 Crosscompilation for Windows under Cygwin</a></h3>
-
-<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>
-
-<hr size="1">
-<p>
- <font size="-1">
- This document was generated by <em>Kyle Schwarz</em> on <em>September 2, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
- </font>
- <br>