On Thu, 27 Sep 2012, Derek Buitenhuis wrote:

Signed-off-by: Derek Buitenhuis <[email protected]>
---
doc/platform.texi |   71 +++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 58 insertions(+), 13 deletions(-)

diff --git a/doc/platform.texi b/doc/platform.texi
index a297ab5..42238d4 100644
--- a/doc/platform.texi
+++ b/doc/platform.texi
@@ -75,7 +75,7 @@ For information about compiling Libav on OS/2 see

@chapter Windows

-@section Native Windows compilation
+@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/}
@@ -114,21 +114,66 @@ you can build all libraries as DLLs.

@end itemize

-@section Microsoft Visual C++ compatibility
+@section Microsoft Visual C++

-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 @emph{must} 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.
+Libav can be built with MSVC using a C99-to-C89 conversion utility and
+wrapper. At this time, only static builds are supported.

-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.
+You will need the following prerequisites:

-@subsection Using shared libraries
+@itemize
+@item @uref{https://github.com/rbultje/c99-to-c89/, C99-to-C89 Converter & 
Wrapper}
+@item @uref{http://code.google.com/p/msinttypes/, msinttypes}
+@item @uref{http://www.mingw.org/, MSYS}
+@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}.
+@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.
+
+Caveat: Run @code{which link} to see which link you are using. If it is 
located at
+@code{/bin/link.exe}, then you have the wrong link in your @code{PATH}. Either
+move/remove that copy, or make sure MSVC's link.exe is higher up in your 
@code{PATH}
+than coreutils'.
+
+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
+@code{--extra-cflags}/@code{--extra-ldflags}.
+
+Finally, run:
+
+@example
+./configure --toolchain=msvc
+make
+make install
+@end example
+
+Notes:
+
+@itemize
+
+@item If you wish to build with zlib support, you must follow a few extra 
steps:
+@itemize
+@item Edit @code{win32/Makefile.msc} so that it uses -MT instead of -MD.

You missed to spell out a logical step here. First we're talking about building libav with zlib source, then you're suddenly expected to have the zlib sources. So first something along the lines of "if you want to build zlib from source using MSVC, do ..., or grab compatible binaries from somewhere". In the latter case, you only need to fix up zconf.h.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to