]> git.sesse.net Git - ffmpeg/blobdiff - doc/platform.texi
dxtory: Factorize the buffer loading
[ffmpeg] / doc / platform.texi
index 6bb7136aa66f98c0f4575873fb1ae324269399a2..07c857532f64fcc9d5b1f6e93d2efaca2fb7eaeb 100644 (file)
@@ -24,6 +24,20 @@ 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}
 to configure.
 
+@section Advanced linking configuration
+
+If you compiled Libav libraries statically and you want to use them to
+build your own shared library, you may need to force PIC support (with
+@code{--enable-pic} during Libav configure) and add the following option
+to your project LDFLAGS:
+
+@example
+-Wl,-Bsymbolic
+@end example
+
+If your target platform requires position independent binaries, you should
+pass the correct linking flag (e.g. @code{-pie}) to @code{--extra-ldexeflags}.
+
 @section BSD
 
 BSD make will not build Libav, you need to install and use GNU Make
@@ -51,12 +65,12 @@ The toolchain provided with Xcode is sufficient to build the basic
 unacelerated code.
 
 OS X on PowerPC or ARM (iPhone) requires a preprocessor from
-@url{http://github.com/yuvi/gas-preprocessor} to build the optimized
-assembler functions. Just download the Perl script and put it somewhere
+@url{git://git.libav.org/gas-preprocessor.git} to build the optimized
+assembly functions. Put the Perl script somewhere
 in your PATH, Libav's configure will pick it up automatically.
 
 OS X on AMD64 and x86 requires @command{yasm} to build most of the
-optimized assembler functions @url{http://mxcl.github.com/homebrew/, Homebrew},
+optimized assembly functions @url{http://mxcl.github.com/homebrew/, Homebrew},
 @url{http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml, Gentoo Prefix}
 or @url{http://www.macports.org, MacPorts} can easily provide it.
 
@@ -77,9 +91,9 @@ For information about compiling Libav on OS/2 see
 
 @section Native Windows compilation using MinGW or MinGW-w64
 
-Libav can be built to run natively on Windows using the MinGW or MinGW-w64
-toolchains. Install the latest versions of MSYS and MinGW or MinGW-w64 from
-@url{http://www.mingw.org/} or @url{http://mingw-w64.sourceforge.net/}.
+Libav can be built to run natively on Windows using the MinGW-w64
+toolchain. Install the latest versions of MSYS2 and MinGW-w64 from
+@url{http://msys2.github.io/} and/or @url{http://mingw-w64.sourceforge.net/}.
 You can find detailed installation instructions in the download section and
 the FAQ.
 
@@ -87,7 +101,7 @@ Notes:
 
 @itemize
 
-@item Building natively using MSYS can be sped up by disabling implicit rules
+@item Building natively using MSYS2 can be sped up by disabling implicit rules
 in the Makefile by calling @code{make -r} instead of plain @code{make}. 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 during
@@ -101,44 +115,52 @@ you can build all libraries as DLLs.
 
 @end itemize
 
-@section Microsoft Visual C++
+@section Microsoft Visual C++ or Intel C++ Compiler for Windows
 
-Libav can be built with MSVC using a C99-to-C89 conversion utility and
-wrapper.
+Libav can be built with MSVC 2012 or earlier using a C99-to-C89 conversion utility
+and wrapper, or with MSVC 2013 and ICL natively.
 
 You will need the following prerequisites:
 
 @itemize
-@item @uref{https://github.com/rbultje/c99-to-c89/, C99-to-C89 Converter & Wrapper}
+@item @uref{https://github.com/libav/c99-to-c89/, C99-to-C89 Converter & Wrapper}
+(if using MSVC 2012 or earlier)
 @item @uref{http://code.google.com/p/msinttypes/, msinttypes}
-@item @uref{http://www.mingw.org/, MSYS}
+(if using MSVC 2012 or earlier)
+@item @uref{http://msys2.github.io/, MSYS2}
 @item @uref{http://yasm.tortall.net/, YASM}
-@item @uref{http://gnuwin32.sourceforge.net/packages/bc.htm, bc for Windows} if
-you want to run @uref{fate.html, FATE}.
+(Also available via MSYS2's package manager.)
 @end itemize
 
-To set up a proper MSVC environment in MSYS, you simply need to run
-@code{msys.bat} from the Visual Studio command prompt.
+To set up a proper environment in MSYS2, you need to run @code{msys_shell.bat} from
+the Visual Studio or Intel Compiler command prompt.
 
-Place @code{makedef}, @code{c99wrap.exe}, @code{c99conv.exe}, and @code{yasm.exe}
-somewhere in your @code{PATH}.
+Place @code{yasm.exe} somewhere in your @code{PATH}. If using MSVC 2012 or
+earlier, place @code{c99wrap.exe} and @code{c99conv.exe} somewhere in your
+@code{PATH} as well.
 
-Next, make sure @code{inttypes.h} and any other headers and libs you want to use
-are located in a spot that MSVC can see. Do so by modifying the @code{LIB} and
-@code{INCLUDE} environment variables to include the @strong{Windows} paths to
-these directories. Alternatively, you can try and use the
-@code{--extra-cflags}/@code{--extra-ldflags} configure options.
+Next, make sure any other headers and libs you want to use, such as zlib, are
+located in a spot that the compiler can see. Do so by modifying the @code{LIB}
+and @code{INCLUDE} environment variables to include the @strong{Windows-style}
+paths to these directories. Alternatively, you can try and use the
+@code{--extra-cflags}/@code{--extra-ldflags} configure options. If using MSVC
+2012 or earlier, place @code{inttypes.h} somewhere the compiler can see too.
 
 Finally, run:
 
 @example
+For MSVC:
 ./configure --toolchain=msvc
+
+For ICL:
+./configure --toolchain=icl
+
 make
 make install
 @end example
 
-If you wish to compile static libraries, add @code{--enable-shared} to your
-configure options. Note that due to the way MSVC handles DLL imports and
+If you wish to compile shared libraries, add @code{--enable-shared} to your
+configure options. Note that due to the way MSVC and ICL handle DLL imports and
 exports, you cannot compile static and shared libraries at the same time, and
 enabling shared libraries will automatically disable the static ones.
 
@@ -146,12 +168,6 @@ Notes:
 
 @itemize
 
-@item It is possible that coreutils' @code{link.exe} conflicts with MSVC's linker.
-You can find out by running @code{which link} to see which @code{link.exe} you
-are using. If it is located at @code{/bin/link.exe}, then you have the wrong one
-in your @code{PATH}. Either move or remove that copy, or make sure MSVC's
-@code{link.exe} takes precedence in your @code{PATH} over coreutils'.
-
 @item If you wish to build with zlib support, you will have to grab a compatible
 zlib binary from somewhere, with an MSVC import lib, or if you wish to link
 statically, you can follow the instructions below to build a compatible
@@ -168,7 +184,14 @@ erroneously included when building Libav.
 can see.
 @end enumerate
 
-@item Libav has been tested with Visual Studio 2010 and 2012, Pro and Express.
+@item Libav has been tested with the following on i686 and x86_64:
+@itemize
+@item Visual Studio 2010 Pro and Express
+@item Visual Studio 2012 Pro and Express
+@item Visual Studio 2013 Pro and Express
+@item Intel Composer XE 2013
+@item Intel Composer XE 2013 SP1
+@end itemize
 Anything else is not officially supported.
 
 @end itemize
@@ -179,16 +202,7 @@ If you plan to link with MSVC-built static libraries, you will need
 to make sure you have @code{Runtime Library} set to
 @code{Multi-threaded (/MT)} in your project's settings.
 
-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:
-@example
-extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[];
-@end example
-
-You will also need to define @code{inline} to something MSVC understands:
+You will need to define @code{inline} to something MSVC understands:
 @example
 #define inline __inline
 @end example
@@ -256,7 +270,7 @@ binutils, gcc4-core, make, git, mingw-runtime, texi2html
 
 In order to run FATE you will also need the following "Utils" packages:
 @example
-bc, diffutils
+diffutils
 @end example
 
 If you want to build Libav with additional libraries, download Cygwin