summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-07-14 22:39:53 +0200
committerwm4 <wm4@nowhere>2016-07-14 22:40:10 +0200
commite656889624cefd576d3f515fba9b6edc7efe5f3c (patch)
tree82ad9f0831226209d31386ea1cab3f33f17250f5 /DOCS
parent91a1b17104e6417cb2c77c838c85fabcff9e7d11 (diff)
downloadmpv-e656889624cefd576d3f515fba9b6edc7efe5f3c.tar.bz2
mpv-e656889624cefd576d3f515fba9b6edc7efe5f3c.tar.xz
DOCS/compile-windows.md: MSVC DLL usage instructions
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/compile-windows.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/DOCS/compile-windows.md b/DOCS/compile-windows.md
index 364a057183..c043671c9f 100644
--- a/DOCS/compile-windows.md
+++ b/DOCS/compile-windows.md
@@ -173,6 +173,24 @@ sed -i 's_/mingw64/bin_/mingw64/lib_' /mingw64/lib/pkgconfig/mpv.pc
rmdir /mingw64/bin/pkgconfig
```
+Linking libmpv with MSVC programs
+---------------------------------
+
+You can build C++ programs in Visual Studio and link them with libmpv. To do
+this, you need a Visual Studio which supports ``stdint.h`` (recent ones do),
+and you need to create a import library for the mpv DLL:
+
+```bash
+lib /def:mpv.def /name:mpv-1.dll /out:mpv.lib /MACHINE:X64
+```
+
+The string in the ``/name:`` parameter must match the filename of the DLL (this
+is simply the filename the MSVC linker will use). The ``mpv.def`` can be
+retrieved from the mpv build directory, or can be produced by MingGW's
+gendef.exe helper from the mpv DLL.
+
+Static linking is not possible.
+
Running mpv
-----------