title: Need help to compile FFmpeg with MSVC tools
body: <p>I need to compile FFmpeg on Windows 10 using MSVC 2017 compiler. I followed some guides from:</p>
  
  <ul>
  <li><a href="https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC" rel="nofollow noreferrer">https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC</a></li>
  <li><a href="https://www.ffmpeg.org/platform.html#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows" rel="nofollow noreferrer">https://www.ffmpeg.org/platform.html#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows</a></li>
  <li><a href="https://pracucci.com/compile-ffmpeg-on-windows-with-visual-studio-compiler.html" rel="nofollow noreferrer">https://pracucci.com/compile-ffmpeg-on-windows-with-visual-studio-compiler.html</a></li>
  </ul>
  
  <p>I installed current stable version of MSYS, fixed link.exe and use of PATH environment, installed <code>make diffutils gcc pkg-config</code> and downloaded c99-to-c89, nasm, and inttypes.h</p>
  
  <p>I think my environment is now correctly set up, I ran MSYS shell from MSVC Command prompt and have everything reachable.</p>
  
  <pre><code>$ which cl
  /c/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.12.25827/bin/HostX64/x64/cl
  
  $ which link
  /c/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.12.25827/bin/HostX64/x64/link
  
  $ which yasm
  /home/Antoine/bin/yasm
  
  $ which c99conv
  /home/Antoine/bin/c99conv
  
  $ which c99wrap
  /home/Antoine/bin/c99wrap
  </code></pre>
  
  <p>Now I configure the build</p>
  
  <pre><code>$ ./configure --toolchain=msvc
  install prefix            /usr/local
  source path               .
  C compiler                cl
  C library                 msvcrt
  ARCH                      x86 (generic)
  big-endian                no
  runtime cpu detection     yes
  standalone assembly       yes
  x86 assembler             nasm
  MMX enabled               yes
  MMXEXT enabled            yes
  3DNow! enabled            yes
  3DNow! extended enabled   yes
  SSE enabled               yes
  SSSE3 enabled             yes
  AESNI enabled             yes
  AVX enabled               yes
  AVX2 enabled              yes
  XOP enabled               yes
  FMA3 enabled              yes
  FMA4 enabled              yes
  i686 features enabled     yes
  CMOV is fast              yes
  EBX available             no
  EBP available             no
  debug symbols             yes
  strip symbols             no
  optimize for size         no
  optimizations             yes
  static                    yes
  shared                    no
  postprocessing support    no
  network support           yes
  threading support         w32threads
  safe bitstream reader     yes
  texi2html enabled         no
  perl enabled              no
  pod2man enabled           no
  makeinfo enabled          no
  makeinfo supports HTML    no
  
  External libraries:
  schannel                 xlib
  
  External libraries providing hardware acceleration:
  cuda                     cuvid                    d3d11va                  dxva2                    nvenc
  
  Libraries:
  avcodec                  avdevice                 avfilter                 avformat                 avutil                   swresample               swscale
  
  Programs:
  ffmpeg                   ffprobe
  
  [...]
  Hundreds of modules, library, etc.
  [...]
  
  License: LGPL version 2.1 or later
  Creating configuration files ...
  config.h is unchanged
  config.asm is unchanged
  libavutil/avconfig.h is unchanged
  libavcodec/bsf_list.c is unchanged
  libavformat/protocol_list.c is unchanged
  </code></pre>
  
  <p>But when I run <code>make</code> it stops very quickly</p>
  
  <pre><code>$ make
  Makefile:47: la cible « qt-faststart » ne correspond pas au motif de cible
  Makefile:47: la cible « trasher » ne correspond pas au motif de cible
  Makefile:47: la cible « uncoded_frame » ne correspond pas au motif de cible
  Makefile:91: ffbuild/library.mak: No such file or directory
  make: *** Aucune règle pour fabriquer la cible « ffbuild/library.mak ». Arrêt.
  </code></pre>
  
  <p>Sorry for the french wording, I don't know how to tell MSVC print its output in english. Basically, the error means:</p>
  
  <pre><code>Makefile:47: target « qt-faststart » doesn't match the target pattern
  make: *** No rule to make target « ffbuild/library.mak ». Stopped.
  </code></pre>
  
  <p>Side notes:</p>
  
  <pre><code>$ tree ffbuild
  ffbuild
  ├── config.fate
  ├── config.log
  ├── config.mak
  └── config.sh
  </code></pre>
  
  <p>That's right, library.mak were not generated into ffbuild, but I don't know why, and configure script didn't output any error message...</p>
  
  <p>Does anybody can help me to find out what am I doing wrong ?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p><code>make distclean</code> doesn't help</p>
  
  <pre><code>$ make distclean
  Makefile:47: la cible « qt-faststart » ne correspond pas au motif de cible
  Makefile:47: la cible « trasher » ne correspond pas au motif de cible
  Makefile:47: la cible « uncoded_frame » ne correspond pas au motif de cible
  Makefile:91: ffbuild/library.mak: No such file or directory
  make: *** Aucune règle pour fabriquer la cible « ffbuild/library.mak ». Arrêt.
  </code></pre>