platform.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by , GNU Texinfo 7.1 -->
  4. <head>
  5. <meta charset="utf-8">
  6. <title>
  7. Platform Specific Information
  8. </title>
  9. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  10. <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
  11. <link rel="stylesheet" type="text/css" href="style.min.css">
  12. </head>
  13. <body>
  14. <div class="container">
  15. <h1>
  16. Platform Specific Information
  17. </h1>
  18. <div class="top-level-extent" id="SEC_Top">
  19. <div class="element-contents" id="SEC_Contents">
  20. <h2 class="contents-heading">Table of Contents</h2>
  21. <div class="contents">
  22. <ul class="toc-numbered-mark">
  23. <li><a id="toc-Unix_002dlike" href="#Unix_002dlike">1 Unix-like</a>
  24. <ul class="toc-numbered-mark">
  25. <li><a id="toc-Advanced-linking-configuration" href="#Advanced-linking-configuration">1.1 Advanced linking configuration</a></li>
  26. <li><a id="toc-BSD" href="#BSD">1.2 BSD</a></li>
  27. <li><a id="toc-_0028Open_0029Solaris" href="#g_t_0028Open_0029Solaris">1.3 (Open)Solaris</a></li>
  28. <li><a id="toc-Darwin-_0028Mac-OS-X_002c-iPhone_0029" href="#Darwin-_0028Mac-OS-X_002c-iPhone_0029">1.4 Darwin (Mac OS X, iPhone)</a></li>
  29. </ul></li>
  30. <li><a id="toc-DOS" href="#DOS">2 DOS</a></li>
  31. <li><a id="toc-OS_002f2" href="#OS_002f2">3 OS/2</a></li>
  32. <li><a id="toc-Windows" href="#Windows">4 Windows</a>
  33. <ul class="toc-numbered-mark">
  34. <li><a id="toc-Native-Windows-compilation-using-MinGW-or-MinGW_002dw64" href="#Native-Windows-compilation-using-MinGW-or-MinGW_002dw64">4.1 Native Windows compilation using MinGW or MinGW-w64</a>
  35. <ul class="toc-numbered-mark">
  36. <li><a id="toc-Native-Windows-compilation-using-MSYS2" href="#Native-Windows-compilation-using-MSYS2">4.1.1 Native Windows compilation using MSYS2</a></li>
  37. </ul></li>
  38. <li><a id="toc-Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows" href="#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows">4.2 Microsoft Visual C++ or Intel C++ Compiler for Windows</a>
  39. <ul class="toc-numbered-mark">
  40. <li><a id="toc-Linking-to-FFmpeg-with-Microsoft-Visual-C_002b_002b" href="#Linking-to-FFmpeg-with-Microsoft-Visual-C_002b_002b">4.2.1 Linking to FFmpeg with Microsoft Visual C++</a></li>
  41. </ul></li>
  42. <li><a id="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>
  43. <li><a id="toc-Compilation-under-Cygwin" href="#Compilation-under-Cygwin">4.4 Compilation under Cygwin</a></li>
  44. <li><a id="toc-Crosscompilation-for-Windows-under-Cygwin" href="#Crosscompilation-for-Windows-under-Cygwin">4.5 Crosscompilation for Windows under Cygwin</a></li>
  45. </ul></li>
  46. </ul>
  47. </div>
  48. </div>
  49. <ul class="mini-toc">
  50. <li><a href="#Unix_002dlike" accesskey="1">Unix-like</a></li>
  51. <li><a href="#DOS" accesskey="2">DOS</a></li>
  52. <li><a href="#OS_002f2" accesskey="3">OS/2</a></li>
  53. <li><a href="#Windows" accesskey="4">Windows</a></li>
  54. </ul>
  55. <div class="chapter-level-extent" id="Unix_002dlike">
  56. <h2 class="chapter"><span>1 Unix-like<a class="copiable-link" href="#Unix_002dlike"> &para;</a></span></h2>
  57. <p>Some parts of FFmpeg cannot be built with version 2.15 of the GNU
  58. assembler which is still provided by a few AMD64 distributions. To
  59. make sure your compiler really uses the required version of gas
  60. after a binutils upgrade, run:
  61. </p>
  62. <div class="example">
  63. <pre class="example-preformatted">$(gcc -print-prog-name=as) --version
  64. </pre></div>
  65. <p>If not, then you should install a different compiler that has no
  66. hard-coded path to gas. In the worst case pass <code class="code">--disable-asm</code>
  67. to configure.
  68. </p>
  69. <ul class="mini-toc">
  70. <li><a href="#Advanced-linking-configuration" accesskey="1">Advanced linking configuration</a></li>
  71. <li><a href="#BSD" accesskey="2">BSD</a></li>
  72. <li><a href="#g_t_0028Open_0029Solaris" accesskey="3">(Open)Solaris</a></li>
  73. <li><a href="#Darwin-_0028Mac-OS-X_002c-iPhone_0029" accesskey="4">Darwin (Mac OS X, iPhone)</a></li>
  74. </ul>
  75. <div class="section-level-extent" id="Advanced-linking-configuration">
  76. <h3 class="section"><span>1.1 Advanced linking configuration<a class="copiable-link" href="#Advanced-linking-configuration"> &para;</a></span></h3>
  77. <p>If you compiled FFmpeg libraries statically and you want to use them to
  78. build your own shared library, you may need to force PIC support (with
  79. <code class="code">--enable-pic</code> during FFmpeg configure) and add the following option
  80. to your project LDFLAGS:
  81. </p>
  82. <div class="example">
  83. <pre class="example-preformatted">-Wl,-Bsymbolic
  84. </pre></div>
  85. <p>If your target platform requires position independent binaries, you should
  86. pass the correct linking flag (e.g. <code class="code">-pie</code>) to <code class="code">--extra-ldexeflags</code>.
  87. </p>
  88. </div>
  89. <div class="section-level-extent" id="BSD">
  90. <h3 class="section"><span>1.2 BSD<a class="copiable-link" href="#BSD"> &para;</a></span></h3>
  91. <p>BSD make will not build FFmpeg, you need to install and use GNU Make
  92. (<code class="command">gmake</code>).
  93. </p>
  94. </div>
  95. <div class="section-level-extent" id="g_t_0028Open_0029Solaris">
  96. <h3 class="section"><span>1.3 (Open)Solaris<a class="copiable-link" href="#g_t_0028Open_0029Solaris"> &para;</a></span></h3>
  97. <p>GNU Make is required to build FFmpeg, so you have to invoke (<code class="command">gmake</code>),
  98. standard Solaris Make will not work. When building with a non-c99 front-end
  99. (gcc, generic suncc) add either <code class="code">--extra-libs=/usr/lib/values-xpg6.o</code>
  100. or <code class="code">--extra-libs=/usr/lib/64/values-xpg6.o</code> to the configure options
  101. since the libc is not c99-compliant by default. The probes performed by
  102. configure may raise an exception leading to the death of configure itself
  103. due to a bug in the system shell. Simply invoke a different shell such as
  104. bash directly to work around this:
  105. </p>
  106. <div class="example">
  107. <pre class="example-preformatted">bash ./configure
  108. </pre></div>
  109. <a class="anchor" id="Darwin"></a></div>
  110. <div class="section-level-extent" id="Darwin-_0028Mac-OS-X_002c-iPhone_0029">
  111. <h3 class="section"><span>1.4 Darwin (Mac OS X, iPhone)<a class="copiable-link" href="#Darwin-_0028Mac-OS-X_002c-iPhone_0029"> &para;</a></span></h3>
  112. <p>The toolchain provided with Xcode is sufficient to build the basic
  113. unaccelerated code.
  114. </p>
  115. <p>Mac OS X on PowerPC or ARM (iPhone) requires a preprocessor from
  116. <a class="url" href="https://github.com/FFmpeg/gas-preprocessor">https://github.com/FFmpeg/gas-preprocessor</a> or
  117. <a class="url" href="https://github.com/yuvi/gas-preprocessor">https://github.com/yuvi/gas-preprocessor</a>(currently outdated) to build the optimized
  118. assembly functions. Put the Perl script somewhere
  119. in your PATH, FFmpeg&rsquo;s configure will pick it up automatically.
  120. </p>
  121. <p>Mac OS X on amd64 and x86 requires <code class="command">nasm</code> to build most of the
  122. optimized assembly functions. <a class="uref" href="http://www.finkproject.org/">Fink</a>,
  123. <a class="uref" href="https://wiki.gentoo.org/wiki/Project:Prefix">Gentoo Prefix</a>,
  124. <a class="uref" href="https://mxcl.github.com/homebrew/">Homebrew</a>
  125. or <a class="uref" href="http://www.macports.org">MacPorts</a> can easily provide it.
  126. </p>
  127. </div>
  128. </div>
  129. <div class="chapter-level-extent" id="DOS">
  130. <h2 class="chapter"><span>2 DOS<a class="copiable-link" href="#DOS"> &para;</a></span></h2>
  131. <p>Using a cross-compiler is preferred for various reasons.
  132. <a class="url" href="http://www.delorie.com/howto/djgpp/linux-x-djgpp.html">http://www.delorie.com/howto/djgpp/linux-x-djgpp.html</a>
  133. </p>
  134. </div>
  135. <div class="chapter-level-extent" id="OS_002f2">
  136. <h2 class="chapter"><span>3 OS/2<a class="copiable-link" href="#OS_002f2"> &para;</a></span></h2>
  137. <p>For information about compiling FFmpeg on OS/2 see
  138. <a class="url" href="http://www.edm2.com/index.php/FFmpeg">http://www.edm2.com/index.php/FFmpeg</a>.
  139. </p>
  140. </div>
  141. <div class="chapter-level-extent" id="Windows">
  142. <h2 class="chapter"><span>4 Windows<a class="copiable-link" href="#Windows"> &para;</a></span></h2>
  143. <p>To get help and instructions for building FFmpeg under Windows, check out
  144. the FFmpeg Windows Help Forum at <a class="url" href="http://ffmpeg.zeranoe.com/forum/">http://ffmpeg.zeranoe.com/forum/</a>.
  145. </p>
  146. <ul class="mini-toc">
  147. <li><a href="#Native-Windows-compilation-using-MinGW-or-MinGW_002dw64" accesskey="1">Native Windows compilation using MinGW or MinGW-w64</a></li>
  148. <li><a href="#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows" accesskey="2">Microsoft Visual C++ or Intel C++ Compiler for Windows</a></li>
  149. <li><a href="#Cross-compilation-for-Windows-with-Linux-1" accesskey="3">Cross compilation for Windows with Linux</a></li>
  150. <li><a href="#Compilation-under-Cygwin" accesskey="4">Compilation under Cygwin</a></li>
  151. <li><a href="#Crosscompilation-for-Windows-under-Cygwin" accesskey="5">Crosscompilation for Windows under Cygwin</a></li>
  152. </ul>
  153. <div class="section-level-extent" id="Native-Windows-compilation-using-MinGW-or-MinGW_002dw64">
  154. <h3 class="section"><span>4.1 Native Windows compilation using MinGW or MinGW-w64<a class="copiable-link" href="#Native-Windows-compilation-using-MinGW-or-MinGW_002dw64"> &para;</a></span></h3>
  155. <p>FFmpeg can be built to run natively on Windows using the MinGW-w64
  156. toolchain. Install the latest versions of MSYS2 and MinGW-w64 from
  157. <a class="url" href="http://msys2.github.io/">http://msys2.github.io/</a> and/or <a class="url" href="http://mingw-w64.sourceforge.net/">http://mingw-w64.sourceforge.net/</a>.
  158. You can find detailed installation instructions in the download section and
  159. the FAQ.
  160. </p>
  161. <p>Notes:
  162. </p>
  163. <ul class="itemize mark-bullet">
  164. <li>Building for the MSYS environment is discouraged, MSYS2 provides a full
  165. MinGW-w64 environment through <samp class="file">mingw64_shell.bat</samp> or
  166. <samp class="file">mingw32_shell.bat</samp> that should be used instead of the environment
  167. provided by <samp class="file">msys2_shell.bat</samp>.
  168. </li><li>Building using MSYS2 can be sped up by disabling implicit rules in the
  169. Makefile by calling <code class="code">make -r</code> instead of plain <code class="code">make</code>. This
  170. speed up is close to non-existent for normal one-off builds and is only
  171. noticeable when running make for a second time (for example during
  172. <code class="code">make install</code>).
  173. </li><li>In order to compile FFplay, you must have the MinGW development library
  174. of <a class="uref" href="http://www.libsdl.org/">SDL</a> and <code class="code">pkg-config</code> installed.
  175. </li><li>By using <code class="code">./configure --enable-shared</code> when configuring FFmpeg,
  176. you can build the FFmpeg libraries (e.g. libavutil, libavcodec,
  177. libavformat) as DLLs.
  178. </li></ul>
  179. <ul class="mini-toc">
  180. <li><a href="#Native-Windows-compilation-using-MSYS2" accesskey="1">Native Windows compilation using MSYS2</a></li>
  181. </ul>
  182. <div class="subsection-level-extent" id="Native-Windows-compilation-using-MSYS2">
  183. <h4 class="subsection"><span>4.1.1 Native Windows compilation using MSYS2<a class="copiable-link" href="#Native-Windows-compilation-using-MSYS2"> &para;</a></span></h4>
  184. <p>The MSYS2 MinGW-w64 environment provides ready to use toolchains and dependencies
  185. through <code class="command">pacman</code>.
  186. </p>
  187. <p>Make sure to use <samp class="file">mingw64_shell.bat</samp> or <samp class="file">mingw32_shell.bat</samp> to have
  188. the correct MinGW-w64 environment. The default install provides shortcuts to
  189. them under <code class="command">MinGW-w64 Win64 Shell</code> and <code class="command">MinGW-w64 Win32 Shell</code>.
  190. </p>
  191. <div class="example">
  192. <pre class="example-preformatted"># normal msys2 packages
  193. pacman -S make pkgconf diffutils
  194. # mingw-w64 packages and toolchains
  195. pacman -S mingw-w64-x86_64-nasm mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2
  196. </pre></div>
  197. <p>To target 32 bits replace <code class="code">x86_64</code> with <code class="code">i686</code> in the command above.
  198. </p>
  199. </div>
  200. </div>
  201. <div class="section-level-extent" id="Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows">
  202. <h3 class="section"><span>4.2 Microsoft Visual C++ or Intel C++ Compiler for Windows<a class="copiable-link" href="#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows"> &para;</a></span></h3>
  203. <p>FFmpeg can be built with MSVC 2013 or later.
  204. </p>
  205. <p>You will need the following prerequisites:
  206. </p>
  207. <ul class="itemize mark-bullet">
  208. <li><a class="uref" href="http://msys2.github.io/">MSYS2</a>
  209. </li><li><a class="uref" href="http://www.nasm.us/">NASM</a>
  210. (Also available via MSYS2&rsquo;s package manager.)
  211. </li></ul>
  212. <p>To set up a proper environment in MSYS2, you need to run <code class="code">msys_shell.bat</code> from
  213. the Visual Studio or Intel Compiler command prompt.
  214. </p>
  215. <p>Place <code class="code">yasm.exe</code> somewhere in your <code class="code">PATH</code>.
  216. </p>
  217. <p>Next, make sure any other headers and libs you want to use, such as zlib, are
  218. located in a spot that the compiler can see. Do so by modifying the <code class="code">LIB</code>
  219. and <code class="code">INCLUDE</code> environment variables to include the <strong class="strong">Windows-style</strong>
  220. paths to these directories. Alternatively, you can try to use the
  221. <code class="code">--extra-cflags</code>/<code class="code">--extra-ldflags</code> configure options.
  222. </p>
  223. <p>Finally, run:
  224. </p>
  225. <div class="example">
  226. <pre class="example-preformatted">For MSVC:
  227. ./configure --toolchain=msvc
  228. For ICL:
  229. ./configure --toolchain=icl
  230. make
  231. make install
  232. </pre></div>
  233. <p>If you wish to compile shared libraries, add <code class="code">--enable-shared</code> to your
  234. configure options. Note that due to the way MSVC and ICL handle DLL imports and
  235. exports, you cannot compile static and shared libraries at the same time, and
  236. enabling shared libraries will automatically disable the static ones.
  237. </p>
  238. <p>Notes:
  239. </p>
  240. <ul class="itemize mark-bullet">
  241. <li>If you wish to build with zlib support, you will have to grab a compatible
  242. zlib binary from somewhere, with an MSVC import lib, or if you wish to link
  243. statically, you can follow the instructions below to build a compatible
  244. <code class="code">zlib.lib</code> with MSVC. Regardless of which method you use, you must still
  245. follow step 3, or compilation will fail.
  246. <ol class="enumerate">
  247. <li> Grab the <a class="uref" href="http://zlib.net/">zlib sources</a>.
  248. </li><li> Edit <code class="code">win32/Makefile.msc</code> so that it uses -MT instead of -MD, since
  249. this is how FFmpeg is built as well.
  250. </li><li> Edit <code class="code">zconf.h</code> and remove its inclusion of <code class="code">unistd.h</code>. This gets
  251. erroneously included when building FFmpeg.
  252. </li><li> Run <code class="code">nmake -f win32/Makefile.msc</code>.
  253. </li><li> Move <code class="code">zlib.lib</code>, <code class="code">zconf.h</code>, and <code class="code">zlib.h</code> to somewhere MSVC
  254. can see.
  255. </li></ol>
  256. </li><li>FFmpeg has been tested with the following on i686 and x86_64:
  257. <ul class="itemize mark-bullet">
  258. <li>Visual Studio 2013 Pro and Express
  259. </li><li>Intel Composer XE 2013
  260. </li><li>Intel Composer XE 2013 SP1
  261. </li></ul>
  262. <p>Anything else is not officially supported.
  263. </p>
  264. </li></ul>
  265. <ul class="mini-toc">
  266. <li><a href="#Linking-to-FFmpeg-with-Microsoft-Visual-C_002b_002b" accesskey="1">Linking to FFmpeg with Microsoft Visual C++</a></li>
  267. </ul>
  268. <div class="subsection-level-extent" id="Linking-to-FFmpeg-with-Microsoft-Visual-C_002b_002b">
  269. <h4 class="subsection"><span>4.2.1 Linking to FFmpeg with Microsoft Visual C++<a class="copiable-link" href="#Linking-to-FFmpeg-with-Microsoft-Visual-C_002b_002b"> &para;</a></span></h4>
  270. <p>If you plan to link with MSVC-built static libraries, you will need
  271. to make sure you have <code class="code">Runtime Library</code> set to
  272. <code class="code">Multi-threaded (/MT)</code> in your project&rsquo;s settings.
  273. </p>
  274. <p>You will need to define <code class="code">inline</code> to something MSVC understands:
  275. </p><div class="example">
  276. <pre class="example-preformatted">#define inline __inline
  277. </pre></div>
  278. <p>Also note, that as stated in <strong class="strong">Microsoft Visual C++</strong>, you will need
  279. an MSVC-compatible <a class="uref" href="http://code.google.com/p/msinttypes/">inttypes.h</a>.
  280. </p>
  281. <p>If you plan on using import libraries created by dlltool, you must
  282. set <code class="code">References</code> to <code class="code">No (/OPT:NOREF)</code> under the linker optimization
  283. settings, otherwise the resulting binaries will fail during runtime.
  284. This is not required when using import libraries generated by <code class="code">lib.exe</code>.
  285. This issue is reported upstream at
  286. <a class="url" href="http://sourceware.org/bugzilla/show_bug.cgi?id=12633">http://sourceware.org/bugzilla/show_bug.cgi?id=12633</a>.
  287. </p>
  288. <p>To create import libraries that work with the <code class="code">/OPT:REF</code> option
  289. (which is enabled by default in Release mode), follow these steps:
  290. </p>
  291. <ol class="enumerate">
  292. <li> Open the <em class="emph">Visual Studio Command Prompt</em>.
  293. <p>Alternatively, in a normal command line prompt, call <samp class="file">vcvars32.bat</samp>
  294. which sets up the environment variables for the Visual C++ tools
  295. (the standard location for this file is something like
  296. <samp class="file">C:\Program Files (x86_\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat</samp>).
  297. </p>
  298. </li><li> Enter the <samp class="file">bin</samp> directory where the created LIB and DLL files
  299. are stored.
  300. </li><li> Generate new import libraries with <code class="command">lib.exe</code>:
  301. <div class="example">
  302. <pre class="example-preformatted">lib /machine:i386 /def:..\lib\foo-version.def /out:foo.lib
  303. </pre></div>
  304. <p>Replace <code class="code">foo-version</code> and <code class="code">foo</code> with the respective library names.
  305. </p>
  306. </li></ol>
  307. <a class="anchor" id="Cross-compilation-for-Windows-with-Linux"></a></div>
  308. </div>
  309. <div class="section-level-extent" id="Cross-compilation-for-Windows-with-Linux-1">
  310. <h3 class="section"><span>4.3 Cross compilation for Windows with Linux<a class="copiable-link" href="#Cross-compilation-for-Windows-with-Linux-1"> &para;</a></span></h3>
  311. <p>You must use the MinGW cross compilation tools available at
  312. <a class="url" href="http://www.mingw.org/">http://www.mingw.org/</a>.
  313. </p>
  314. <p>Then configure FFmpeg with the following options:
  315. </p><div class="example">
  316. <pre class="example-preformatted">./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
  317. </pre></div>
  318. <p>(you can change the cross-prefix according to the prefix chosen for the
  319. MinGW tools).
  320. </p>
  321. <p>Then you can easily test FFmpeg with <a class="uref" href="http://www.winehq.com/">Wine</a>.
  322. </p>
  323. </div>
  324. <div class="section-level-extent" id="Compilation-under-Cygwin">
  325. <h3 class="section"><span>4.4 Compilation under Cygwin<a class="copiable-link" href="#Compilation-under-Cygwin"> &para;</a></span></h3>
  326. <p>Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack
  327. llrint() in its C library.
  328. </p>
  329. <p>Install your Cygwin with all the &quot;Base&quot; packages, plus the
  330. following &quot;Devel&quot; ones:
  331. </p><div class="example">
  332. <pre class="example-preformatted">binutils, gcc4-core, make, git, mingw-runtime, texinfo
  333. </pre></div>
  334. <p>In order to run FATE you will also need the following &quot;Utils&quot; packages:
  335. </p><div class="example">
  336. <pre class="example-preformatted">diffutils
  337. </pre></div>
  338. <p>If you want to build FFmpeg with additional libraries, download Cygwin
  339. &quot;Devel&quot; packages for Ogg and Vorbis from any Cygwin packages repository:
  340. </p><div class="example">
  341. <pre class="example-preformatted">libogg-devel, libvorbis-devel
  342. </pre></div>
  343. <p>These library packages are only available from
  344. <a class="uref" href="http://sourceware.org/cygwinports/">Cygwin Ports</a>:
  345. </p>
  346. <div class="example">
  347. <pre class="example-preformatted">yasm, libSDL-devel, libgsm-devel, libmp3lame-devel,
  348. speex-devel, libtheora-devel, libxvidcore-devel
  349. </pre></div>
  350. <p>The recommendation for x264 is to build it from source, as it evolves too
  351. quickly for Cygwin Ports to be up to date.
  352. </p>
  353. </div>
  354. <div class="section-level-extent" id="Crosscompilation-for-Windows-under-Cygwin">
  355. <h3 class="section"><span>4.5 Crosscompilation for Windows under Cygwin<a class="copiable-link" href="#Crosscompilation-for-Windows-under-Cygwin"> &para;</a></span></h3>
  356. <p>With Cygwin you can create Windows binaries that do not need the cygwin1.dll.
  357. </p>
  358. <p>Just install your Cygwin as explained before, plus these additional
  359. &quot;Devel&quot; packages:
  360. </p><div class="example">
  361. <pre class="example-preformatted">gcc-mingw-core, mingw-runtime, mingw-zlib
  362. </pre></div>
  363. <p>and add some special flags to your configure invocation.
  364. </p>
  365. <p>For a static build run
  366. </p><div class="example">
  367. <pre class="example-preformatted">./configure --target-os=mingw32 --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
  368. </pre></div>
  369. <p>and for a build with shared libraries
  370. </p><div class="example">
  371. <pre class="example-preformatted">./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
  372. </pre></div>
  373. </div>
  374. </div>
  375. </div>
  376. <p style="font-size: small;">
  377. This document was generated using <a class="uref" href="https://www.gnu.org/software/texinfo/"><em class="emph">makeinfo</em></a>.
  378. </p>
  379. </div>
  380. </body>
  381. </html>