title: Visual C++ linker can't resolve FFmpeg's external symbols
body: <p>I'm making a C++ program and I want to use FFmpeg pre-built for x64, which is a C-compiled library.
  I'm using this code in order to include its header:</p>
  
  <pre><code>extern "C" {
      #include "libavcodec/avcodec.h"
      #include "libavformat/avformat.h"
  
      #pragma comment (lib,"G:/Documents/ffmpeg/lib/avcodec.lib")
      #pragma comment (lib,"G:/Documents/ffmpeg/lib/avformat.lib")
  }
  </code></pre>
  
  <p>I'm then calling the symbols like I would do for a normal function, for example with <code>av_interleaved_write_frame(out-&gt;formatContext, &amp;packet);</code></p>
  
  <p>However, when I try to compile it with Visual Studio 2015's built-in C++ compiler, I get a lot of error like</p>
  
  <pre><code>Error   LNK2019 unresolved external symbol _av_write_trailer referenced in function "void __cdecl closeArenaVideo(struct VideoOutput *)" (?closeArenaVideo@@YAXPAUVideoOutput@@@Z)  Sparta2 c:\Users\Théo\documents\visual studio 2015\Projects\Sparta2\Sparta2\video.obj   
  </code></pre>
  
  <p>for basically any of the symbols I'm refering to.</p>
  
  <p>I tried to import everything in Visual Studio, to compile with command-line, to manually put FFmpeg's libraries in the default libraries path, without success.</p>
  
  <p>Thank you in advance!</p>