title: Linking libav libraries in Visual Studio 2008
body: <p>With an ojective to record the animations of OpenGL output by statically </p>
  
  <p>linked avlib libraries I followed th following steps.</p>
  
  <ol>
  <li><p>I have downloaded the libav-win32-20130921.7z file from
  <a href="http://win32.libav.org/win32/" rel="nofollow">http://win32.libav.org/win32/</a> and decompressed all the files in to a
  folder (d:/VC Projects/libav/). The lib sub-folder contains all the
  .a files (libavcodec.a, libavdevice.a, libavfilter.a, libavformat.a,
  libavresample.a, libavutil.a, libswscale.a and libavcodec.dll.a,
  libavdevice.dll.a, libavfilter.dll.a, libavformat.dll.a,
  libavresample.dll.a, libavutil.dll.a, libswscale.dll.a) in addition
  to 7 .def files.</p></li>
  <li><p>In my main header file I inserted the following code:</p></li>
  </ol>
  
  <blockquote>
  <pre><code>extern "C" 
  {
  #include &lt;stdint.h&gt;
  #include &lt;libavcodec/avcodec.h&gt;
  #include &lt;libavfilter/avfilter.h&gt;
  #include &lt;libavformat/avformat.h&gt;
  #include &lt;libavfilter/avfilter.h&gt;
  #include &lt;libavresample/avresample.h&gt;
  #include &lt;libavutil/avutil.h&gt;
  #include &lt;libswscale/swscale.h&gt;
  
  #pragma comment(lib, "D:/VC Projects/libav/lib/libavutil.a")
  #pragma comment(lib, "D:/VC Projects/libav/lib/libswscale.a")
  #pragma comment(lib, "D:/VC Projects/libav/lib/libavfilter.a")
  #pragma comment(lib, "D:/VC Projects/libav/lib/libavresample.a")
  #pragma comment(lib, "D:/VC Projects/libav/lib/libavcodec.a")
  #pragma comment(lib, "D:/VC Projects/libav/lib/libavdevice.a")
  #pragma comment(lib, "D:/VC Projects/libav/lib/libavformat.a")
  }
  </code></pre>
  </blockquote>
  
  <ol>
  <li>In the project settings provided the additional include directories
  "D:\VC Projects\libav\include"</li>
  </ol>
  
  <p>When I compile the project I get 316 errors and 31 warnings:</p>
  
  <pre><code>&gt; libavcodec.a(pthread.o) : warning LNK4217: locally defined symbol
  &gt; __beginthreadex imported in function _ff_thread_init libavutil.a(avstring.o) : warning LNK4049: locally defined symbol
  &gt; __vsnprintf imported libavformat.a(aviobuf.o) : warning LNK4217: locally defined symbol __vsnprintf imported in function _avio_printf
  &gt; libavformat.a(rtpproto.o) : warning LNK4049: locally defined symbol
  &gt; __vsnprintf imported libavformat.a(url.o) : warning LNK4049: locally defined symbol __vsnprintf imported libavutil.a(log.o) : warning
  &gt; LNK4049: locally defined symbol __vsnprintf imported
  &gt; libavformat.a(mov.o) : warning LNK4217: locally defined symbol
  &gt; __gmtime64 imported in function _mov_read_mdhd libavformat.a(mxfenc.o) : warning LNK4217: locally defined symbol __gmtime64 imported in
  &gt; function _mxf_write_header libavformat.a(wtv.o) : warning LNK4217:
  &gt; locally defined symbol __gmtime64 imported in function
  &gt; _parse_media_type libavutil.a(parseutils.o) : warning LNK4049: locally defined symbol __gmtime64 imported libavformat.a(os_support.o) :
  &gt; warning LNK4049: locally defined symbol __errno imported
  &gt; libavutil.a(file_open.o) : warning LNK4049: locally defined symbol
  &gt; __errno imported libavformat.a(rtsp.o) : warning LNK4217: locally defined symbol __errno imported in function
  &gt; _udp_read_packet.constprop.5 libavformat.a(file.o) : warning LNK4049: locally defined symbol __errno imported libavformat.a(md5proto.o) :
  &gt; warning LNK4049: locally defined symbol __errno imported
  &gt; libavformat.a(network.o) : warning LNK4049: locally defined symbol
  &gt; __errno imported libavformat.a(file.o) : warning LNK4217: locally defined symbol __stat64 imported in function _file_check
  &gt; libavformat.a(md5proto.o) : warning LNK4217: locally defined symbol
  &gt; __iob imported in function _md5_close libavutil.a(log.o) : warning LNK4217: locally defined symbol __iob imported in function
  &gt; _av_log_default_callback libavutil.a(parseutils.o) : warning LNK4217: locally defined symbol __time64 imported in function _av_parse_time
  &gt; libavutil.a(parseutils.o) : warning LNK4217: locally defined symbol
  &gt; __mktime64 imported in function _av_parse_time libavutil.a(parseutils.o) : warning LNK4217: locally defined symbol
  &gt; __localtime64 imported in function _av_parse_time libavutil.a(file_open.o) : warning LNK4217: locally defined symbol
  &gt; __wsopen imported in function _avpriv_open libavutil.a(file_open.o) : warning LNK4217: locally defined symbol __sopen imported in function
  &gt; _avpriv_open libavformat.a(riffenc.o) : error LNK2001: unresolved external symbol ___divdi3 libavutil.a(mathematics.o) : error LNK2001:
  &gt; unresolved external symbol ___divdi3 libavutil.a(rational.o) : error
  &gt; LNK2001: unresolved external symbol ___divdi3 libavformat.a(xa.o) :
  &gt; error LNK2001: unresolved external symbol ___divdi3
  &gt; libavformat.a(xwma.o) : error LNK2001: unresolved external symbol
  &gt; ___divdi3 libavformat.a(yop.o) : error LNK2001: unresolved external symbol ___divdi3 libavformat.a(cutils.o) : error LNK2001: unresolved
  &gt; external symbol ___divdi3 libavformat.a(rmdec.o) : error LNK2019:
  &gt; unresolved external symbol ___divdi3 referenced in function
  &gt; _rm_read_header libavformat.a(rtpenc.o) : error LNK2001: unresolved external symbol ___divdi3 libavformat.a(rtspdec.o) : error LNK2001:
  &gt; unresolved external symbol ___divdi3 libavformat.a(wtv.o) : error
  &gt; LNK2001: unresolved external symbol ___divdi3 libavformat.a(nutenc.o)
  &gt; : error LNK2001: unresolved external symbol ___divdi3
  &gt; libavformat.a(nutdec.o) : error LNK2001: unresolved external symbol
  &gt; ___divdi3 libavformat.a(pcmdec.o) : error LNK2001: unresolved external symbol ___divdi3 libavformat.a(rawvideodec.o) : error LNK2001:
  &gt; unresolved external symbol ___divdi3 libavformat.a(mpegtsenc.o) :
  &gt; error LNK2001: unresolved external symbol ___divdi3
  &gt; libavformat.a(mpegts.o) : error LNK2001: unresolved external symbol
  &gt; ___divdi3 libavformat.a(mxfdec.o) : error LNK2001: unresolved external symbol ___divdi3 libavformat.a(nsvdec.o) : error LNK2001: unresolved
  &gt; external symbol ___divdi3 libavformat.a(mmf.o) : error LNK2001:
  &gt; unresolved external symbol ___divdi3 libavformat.a(mov.o) : error
  &gt; LNK2001: unresolved external symbol ___divdi3 libavformat.a(mpc8.o) :
  &gt; error LNK2001: unresolved external symbol ___divdi3
  &gt; libavformat.a(mpegenc.o) : error LNK2001: unresolved external symbol
  &gt; ___divdi3 libavformat.a(filmstripdec.o) : error LNK2001: unresolved external symbol ___divdi3 libavformat.a(flvenc.o) : error LNK2001:
  &gt; unresolved external symbol ___divdi3 libavformat.a(gsmdec.o) : error
  &gt; LNK2001: unresolved external symbol ___divdi3 libavformat.a(iss.o) :
  &gt; error LNK2001: unresolved external symbol ___divdi3
  &gt; libavformat.a(dvenc.o) : error LNK2001: unresolved external symbol
  &gt; ___divdi3 libavformat.a(dv.o) : error LNK2001: unresolved external symbol ___divdi3 libavformat.a(dxa.o) : error LNK2001: unresolved
  &gt; external symbol ___divdi3 libavformat.a(ffmdec.o) : error LNK2001:
  &gt; unresolved external symbol ___divdi3 libavformat.a(avienc.o) : error
  &gt; LNK2001: unresolved external symbol ___divdi3 libavformat.a(avidec.o)
  &gt; : error LNK2001: unresolved external symbol ___divdi3
  &gt; libavformat.a(swfenc.o) : error LNK2001: unresolved external symbol
  &gt; ___divdi3 libavformat.a(cafdec.o) : error LNK2001: unresolved external symbol ___divdi3 libavformat.a(adxdec.o) : error LNK2001: unresolved
  &gt; external symbol ___divdi3 libavformat.a(aiffenc.o) : error LNK2001:
  &gt; unresolved external symbol ___divdi3 libavformat.a(asfenc.o) : error
  &gt; LNK2001: unresolved external symbol ___divdi3 libavformat.a(asfdec.o)
  &gt; : error LNK2001: unresolved external symbol ___divdi3
  &gt; libavcodec.a(error_resilience.o) : error LNK2001: unresolved external
  &gt; symbol ___divdi3 libavcodec.a(iirfilter.o) : error LNK2001: unresolved
  &gt; external symbol ___divdi3 libavformat.a(mux.o) : error LNK2001:
  &gt; unresolved external symbol ___divdi3 libavformat.a(utils.o) : error
  &gt; LNK2001: unresolved external symbol ___divdi3 libavcodec.a(wmaenc.o) :
  &gt; error LNK2001: unresolved external symbol ___divdi3
  &gt; libavcodec.a(xsubenc.o) : error LNK2001: unresolved external symbol
  &gt; ___divdi3 libavcodec.a(libvpxenc.o) : error LNK2001: unresolved external symbol ___divdi3 libavcodec.a(ituh263enc.o) : error LNK2001:
  &gt; unresolved external symbol ___divdi3 libavcodec.a(mpeg4videodec.o) :
  &gt; error LNK2001: unresolved external symbol ___divdi3
  &gt; libavcodec.a(ac3enc_fixed.o) : error LNK2001: unresolved external
  &gt; symbol ___divdi3 libavcodec.a(mpegaudiodec.o) : error LNK2001:
  &gt; unresolved external symbol ___divdi3
  &gt; libavcodec.a(mpegaudiodec_float.o) : error LNK2001: unresolved
  &gt; external symbol ___divdi3 libavcodec.a(h261enc.o) : error LNK2001:
  &gt; unresolved external symbol ___divdi3 libavcodec.a(mpegvideo_enc.o) :
  &gt; error LNK2001: unresolved external symbol ___divdi3
  &gt; libavcodec.a(mpeg12enc.o) : error LNK2001: unresolved external symbol
  &gt; ___divdi3 libavcodec.a(mpeg4videoenc.o) : error LNK2001: unresolved external symbol ___divdi3 libswscale.a(utils.o) : error LNK2001:
  &gt; unresolved external symbol ___divdi3 libswscale.a(yuv2rgb.o) : error
  &gt; LNK2001: unresolved external symbol ___divdi3 libavcodec.a(ffv1enc.o)
  &gt; : error LNK2001: unresolved external symbol ___divdi3
  &gt; libavcodec.a(flvenc.o) : error LNK2001: unresolved external symbol
  &gt; ___divdi3 libavutil.a(avstring.o) : error LNK2001: unresolved external symbol _snprintf libavutil.a(error.o) : error LNK2001: unresolved
  &gt; external symbol _snprintf libavutil.a(log.o) : error LNK2001:
  &gt; unresolved external symbol _snprintf libavutil.a(opt.o) : error
  &gt; LNK2001: unresolved external symbol _snprintf
  &gt; libavutil.a(channel_layout.o) : error LNK2001: unresolved external
  &gt; symbol _snprintf libavutil.a(samplefmt.o) : error LNK2001: unresolved
  &gt; external symbol _snprintf libavformat.a(id3v2.o) : error LNK2001:
  &gt; unresolved external symbol _snprintf libavformat.a(id3v1.o) : error
  &gt; LNK2001: unresolved external symbol _snprintf
  &gt; libavformat.a(httpauth.o) : error LNK2001: unresolved external symbol
  &gt; _snprintf libavutil.a(pixdesc.o) : error LNK2001: unresolved external symbol _snprintf libavformat.a(md5proto.o) : error LNK2001: unresolved
  &gt; external symbol _snprintf libavformat.a(rtpproto.o) : error LNK2001:
  &gt; unresolved external symbol _snprintf libavformat.a(tcp.o) : error
  &gt; LNK2001: unresolved external symbol _snprintf libavformat.a(udp.o) :
  &gt; error LNK2001: unresolved external symbol _snprintf
  &gt; libavformat.a(gopher.o) : error LNK2001: unresolved external symbol
  &gt; _snprintf libavformat.a(http.o) : error LNK2001: unresolved external symbol _snprintf libavformat.a(mmsh.o) : error LNK2001: unresolved
  &gt; external symbol _snprintf libavformat.a(mmst.o) : error LNK2001:
  &gt; unresolved external symbol _snprintf libavformat.a(vqf.o) : error
  &gt; LNK2001: unresolved external symbol _snprintf libavformat.a(wavdec.o)
  &gt; : error LNK2001: unresolved external symbol _snprintf
  &gt; libavformat.a(wtv.o) : error LNK2001: unresolved external symbol
  &gt; _snprintf libavformat.a(yuv4mpeg.o) : error LNK2001: unresolved external symbol _snprintf libavformat.a(mpjpeg.o) : error LNK2001:
  &gt; unresolved external symbol _snprintf libavformat.a(rtsp.o) : error
  &gt; LNK2019: unresolved external symbol _snprintf referenced in function
  &gt; _ff_rtsp_connect libavformat.a(rtspdec.o) : error LNK2001: unresolved external symbol _snprintf libavformat.a(smoothstreamingenc.o) : error
  &gt; LNK2001: unresolved external symbol _snprintf libavformat.a(movenc.o)
  </code></pre>
  
  <p>..........</p>
  
  <blockquote>
    <p>error LNK2001: unresolved external symbol _snprintf
    libavcodec.a(ass.o) : error LNK2001: unresolved external symbol
    _snprintf libavformat.a(utils.o) : error LNK2001: unresolved external symbol _snprintf libavcodec.a(pnmenc.o) : error LNK2001: unresolved
    external symbol _snprintf libavcodec.a(xbmenc.o) : error LNK2001:
    unresolved external symbol _snprintf libavcodec.a(srtdec.o) : error
    LNK2001: unresolved external symbol _snprintf libavcodec.a(xsubenc.o)
    : error LNK2001: unresolved external symbol _snprintf
    libavcodec.a(utils.o) : error LNK2001: unresolved external symbol
    _snprintf libavcodec.a(ffv1enc.o) : error LNK2001: unresolved external symbol _snprintf libavcodec.a(huffyuvenc.o) : error LNK2001:
    unresolved external symbol _snprintf libavcodec.a(pamenc.o) : error
    LNK2001: unresolved external symbol <em>snprintf
    libavformat.a(rtpproto.o) : error LNK2019: unresolved external symbol
    _</em>_chkstk_ms referenced in function _rtp_write libavformat.a(smoothstreamingenc.o) : error LNK2001: unresolved
    external symbol ___chkstk_ms libavformat.a(wtv.o) : error LNK2001:
    unresolved external symbol ___chkstk_ms libavformat.a(gopher.o) :
    error LNK2001: unresolved external symbol ___chkstk_ms
    libavformat.a(http.o) : error LNK2001: unresolved external symbol
    ___chkstk_ms libavformat.a(rtsp.o) : error LNK2001: unresolved external symbol ___chkstk_ms libavformat.a(rtspenc.o) : error LNK2001:
    unresolved external symbol ___chkstk_ms libavformat.a(rtspdec.o) :
    error LNK2001: unresolved external symbol ___chkstk_ms
    libavformat.a(sapdec.o) : error LNK2001: unresolved external symbol
    ___chkstk_ms libavcodec.a(mpegaudiodsp.o) : error LNK2001: unresolved external symbol ___chkstk_ms libavformat.a(aviobuf.o) : error LNK2001:
    unresolved external symbol ___chkstk_ms libavformat.a(hls.o) : error
    LNK2001: unresolved external symbol ___chkstk_ms
    libavformat.a(mpegts.o) : error LNK2001: unresolved external symbol
    ___chkstk_ms libavcodec.a(aaccoder.o) : error LNK2001: unresolved external symbol ___chkstk_ms libavcodec.a(kbdwin.o) : error LNK2001:
    unresolved external symbol ___chkstk_ms libavcodec.a(aacpsy.o) : error
    LNK2001: unresolved external symbol ___chkstk_ms libavcodec.a(aacps.o)
    : error LNK2001: unresolved external symbol ___chkstk_ms
    libavcodec.a(mpegvideo.o) : error LNK2001: unresolved external symbol
      ..........
    libavcodec.a(jpeg2000dec.o) : error LNK2001: unresolved external
    symbol ___chkstk_ms libavcodec.a(jpeglsenc.o) : error LNK2001:
    unresolved external symbol ___chkstk_ms libavcodec.a(svq1enc.o) :
    error LNK2001: unresolved external symbol ___chkstk_ms
    libavcodec.a(utvideoenc.o) : error LNK2001: unresolved external symbol
    ___chkstk_ms libavcodec.a(huffyuvdec.o) : error LNK2001: unresolved external symbol ___chkstk_ms libavcodec.a(4xm.o) : error LNK2001:
    unresolved external symbol ___chkstk_ms libavcodec.a(fraps.o) : error
    LNK2001: unresolved external symbol ___chkstk_ms
    libavcodec.a(mpegvideo_enc.o) : error LNK2001: unresolved external
    symbol ___chkstk_ms libavcodec.a(dnxhdenc.o) : error LNK2001:
    unresolved external symbol ___chkstk_ms libavcodec.a(dv.o) : error
    LNK2001: unresolved external symbol ___chkstk_ms libavcodec.a(dvdec.o)
    : error LNK2001: unresolved external symbol ___chkstk_ms
    libavcodec.a(ffv1enc.o) : error LNK2001: unresolved external symbol
    ___chkstk_ms libavformat.a(xwma.o) : error LNK2001: unresolved external symbol __<em>udivdi3 libavformat.a(oggparseogm.o) : error
    LNK2001: unresolved external symbol _</em>_udivdi3 libavformat.a(nutdec.o)
    : error LNK2019: unresolved external symbol ___udivdi3 referenced in
    function _nut_read_header libavformat.a(r3d.o) : error LNK2001:
    unresolved external symbol __<em>udivdi3 libavformat.a(tty.o) : error
    LNK2001: unresolved external symbol _</em>_udivdi3 libavformat.a(wavdec.o)</p>
  </blockquote>
  
  <pre><code>&gt; referenced in function _mp3lame_encode_init libavcodec.a(libmp3lame.o)
  &gt; : error LNK2019: unresolved external symbol _lame_get_encoder_delay
  &gt; referenced in function _mp3lame_encode_init libavcodec.a(libmp3lame.o)
  &gt; : error LNK2019: unresolved external symbol _lame_get_framesize
  &gt; referenced in function _mp3lame_encode_init libavcodec.a(libmp3lame.o)
  &gt; : error LNK2019: unresolved external symbol _lame_encode_buffer_float
  &gt; referenced in function _mp3lame_encode_frame
  &gt; libavcodec.a(libmp3lame.o) : error LNK2019: unresolved external symbol
  &gt; _lame_encode_buffer referenced in function _mp3lame_encode_frame libavcodec.a(libmp3lame.o) : error LNK2019: unresolved external symbol
  &gt; _lame_encode_buffer_int referenced in function _mp3lame_encode_frame libavcodec.a(libmp3lame.o) : error LNK2019: unresolved external symbol
  &gt; _lame_encode_flush referenced in function _mp3lame_encode_frame libavcodec.a(libvo-aacenc.o) : error LNK2019: unresolved external
  &gt; symbol _cmnMemAlloc referenced in function _aac_encode_init
  &gt; libavcodec.a(libvo-aacenc.o) : error LNK2019: unresolved external
  &gt; symbol _cmnMemCopy referenced in function _aac_encode_init
  &gt; libavcodec.a(libvo-aacenc.o) : error LNK2019: unresolved external
  &gt; symbol _cmnMemFree referenced in function _aac_encode_init
  &gt; libavcodec.a(libvo-aacenc.o) : error LNK2019: unresolved external
  &gt; symbol _cmnMemSet referenced in function _aac_encode_init
  &gt; libavcodec.a(libvo-aacenc.o) : error LNK2019: unresolved external
  &gt; symbol _cmnMemCheck referenced in function _aac_encode_init
  &gt; libavcodec.a(libvo-aacenc.o) : error LNK2019: unresolved external
  &gt; symbol _voGetAACEncAPI referenced in function _aac_encode_init
  &gt; libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol
  &gt; _vorbis_analysis_wrote referenced in function _oggvorbis_encode_frame libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol
  &gt; _vorbis_block_clear referenced in function _oggvorbis_encode_close libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol
  &gt; _vorbis_dsp_clear referenced in function _oggvorbis_encode_close libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol
  &gt; _vorbis_info_clear referenced in function _oggvorbis_encode_close libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol
  &gt; _vorbis_analysis_buffer referenced in function _oggvorbis_encode_frame libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol
  &gt; _vorbis_analysis_blockout referenced in function _oggvorbis_encode_frame libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol _vorbis_analysis referenced in function
  &gt; _oggvorbis_encode_frame libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol _vorbis_bitrate_addblock referenced in
  &gt; function _oggvorbis_encode_frame libavcodec.a(libvorbis.o) : error
  &gt; LNK2019: unresolved external symbol _vorbis_bitrate_flushpacket
  &gt; referenced in function _oggvorbis_encode_frame
  &gt; libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol
  &gt; _vorbis_info_init referenced in function _oggvorbis_encode_init libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol
  &gt; _vorbis_encode_setup_vbr referenced in function _oggvorbis_encode_init libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol
  &gt; _vorbis_encode_setup_managed referenced in function _oggvorbis_encode_init libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol _vorbis_encode_ctl referenced in function
  &gt; _oggvorbis_encode_init libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol _vorbis_encode_setup_init referenced in
  &gt; function _oggvorbis_encode_init libavcodec.a(libvorbis.o) : error
  &gt; LNK2019: unresolved external symbol _vorbis_analysis_init referenced
  &gt; in function _oggvorbis_encode_init libavcodec.a(libvorbis.o) : error
  &gt; LNK2019: unresolved external symbol _vorbis_block_init referenced in
  &gt; function _oggvorbis_encode_init libavcodec.a(libvorbis.o) : error
  &gt; LNK2019: unresolved external symbol _vorbis_comment_init referenced in
  &gt; function _oggvorbis_encode_init libavcodec.a(libvorbis.o) : error
  &gt; LNK2019: unresolved external symbol _vorbis_comment_add_tag referenced
  &gt; in function _oggvorbis_encode_init libavcodec.a(libvorbis.o) : error
  &gt; LNK2019: unresolved external symbol _vorbis_analysis_headerout
  &gt; referenced in function _oggvorbis_encode_init
  &gt; libavcodec.a(libvorbis.o) : error LNK2019: unresolved external symbol
  &gt; _vorbis_comment_clear referenced in function _oggvorbis_encode_init libavcodec.a(libvpxenc.o) : error LNK2019: unresolved external symbol
  &gt; _vpx_codec_vp8_cx_algo referenced in function _vp8_init libavcodec.a(libvpxenc.o) : error LNK2019: unresolved external symbol
  &gt; _vpx_codec_error referenced in function _log_encoder_error libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol
  &gt; _vpx_codec_error libavcodec.a(libvpxenc.o) : error LNK2019: unresolved external symbol _vpx_codec_error_detail referenced in function
  &gt; _log_encoder_error libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol _vpx_codec_error_detail
  &gt; libavcodec.a(libvpxenc.o) : error LNK2019: unresolved external symbol
  &gt; _vpx_codec_control_ referenced in function _codecctl_int libavcodec.a(libvpxenc.o) : error LNK2019: unresolved external symbol
  &gt; _vpx_codec_destroy referenced in function _vp8_free libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol
  &gt; _vpx_codec_destroy libavcodec.a(libvpxenc.o) : error LNK2019: unresolved external symbol _vpx_codec_version_str referenced in
  &gt; function _vp8_init libavcodec.a(libvpxdec.o) : error LNK2001:
  &gt; unresolved external symbol _vpx_codec_version_str
  &gt; libavcodec.a(libvpxenc.o) : error LNK2019: unresolved external symbol
  &gt; _vpx_codec_build_config referenced in function _vp8_init libavcodec.a(libvpxdec.o) : error LNK2001: unresolved external symbol
  &gt; _vpx_codec_build_config libavcodec.a(libvpxenc.o) : error LNK2019: unresolved external symbol _vpx_codec_enc_config_default referenced in
  &gt; function _vp8_init libavcodec.a(libvpxenc.o) : error LNK2019:
  &gt; unresolved external symbol _vpx_codec_err_to_string referenced in
  &gt; function _vp8_init libavcodec.a(libvpxenc.o) : error LNK2019:
  &gt; unresolved external symbol _vpx_codec_enc_init_ver referenced in
  &gt; function _vp8_init libavcodec.a(libvpxenc.o) : error LNK2019:
  &gt; unresolved external symbol _vpx_img_wrap referenced in function
  &gt; _vp8_init libavcodec.a(libvpxenc.o) : error LNK2019: unresolved external symbol _vpx_codec_encode referenced in function _vp8_encode
  &gt; libavcodec.a(libvpxenc.o) : error LNK2019: unresolved external symbol
  &gt; _vpx_codec_get_cx_data referenced in function _vp8_encode libavcodec.a(libvpxdec.o) : error LNK2019: unresolved external symbol
  &gt; _vpx_codec_vp8_dx_algo referenced in function _vp8_init libavcodec.a(libvpxdec.o) : error LNK2019: unresolved external symbol
  &gt; _vpx_codec_decode referenced in function _vp8_decode libavcodec.a(libvpxdec.o) : error LNK2019: unresolved external symbol
  &gt; _vpx_codec_get_frame referenced in function _vp8_decode libavcodec.a(libvpxdec.o) : error LNK2019: unresolved external symbol
  &gt; _vpx_codec_dec_init_ver referenced in function _vp8_init libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_bit_depth referenced in function _X264_frame libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_encoder_close referenced in function _X264_close libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_param_default referenced in function _X264_init libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_param_default_preset referenced in function _X264_init libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_param_parse referenced in function _X264_init libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_param_apply_fastfirstpass referenced in function _X264_init libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_param_apply_profile referenced in function _X264_init libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_encoder_open_125 referenced in function _X264_init libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_encoder_headers referenced in function _X264_init libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_picture_init referenced in function _X264_frame libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_encoder_reconfig referenced in function _X264_frame libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_encoder_encode referenced in function _X264_frame libavcodec.a(libx264.o) : error LNK2019: unresolved external symbol
  &gt; _x264_encoder_delayed_frames referenced in function _X264_frame libavcodec.a(aacsbr.o) : error LNK2019: unresolved external symbol
  &gt; _exp2f referenced in function _ff_sbr_apply libavcodec.a(acelp_pitch_delay.o) : error LNK2001: unresolved external
  &gt; symbol _exp2f libavcodec.a(aacpsy.o) : error LNK2019: unresolved
  &gt; external symbol _atanf referenced in function _calc_bark
  &gt; libavcodec.a(aacps.o) : error LNK2001: unresolved external symbol
  &gt; _atanf libavformat.a(smoothstreamingenc.o) : error LNK2019: unresolved external symbol __imp___mkdir referenced in function _ism_write_header
  &gt; libavformat.a(wavenc.o) : error LNK2019: unresolved external symbol
  &gt; _strtoll referenced in function _wav_write_header libavformat.a(http.o) : error LNK2001: unresolved external symbol
  &gt; _strtoll libavutil.a(channel_layout.o) : error LNK2001: unresolved external symbol _strtoll libavformat.a(file.o) : error LNK2019:
  &gt; unresolved external symbol __imp___fstat64 referenced in function
  &gt; _file_seek libavformat.a(librtmp.o) : error LNK2019: unresolved external symbol _RTMP_Socket referenced in function
  &gt; _rtmp_get_file_handle libavformat.a(librtmp.o) : error LNK2019: unresolved external symbol _RTMP_SendSeek referenced in function
  &gt; _rtmp_read_seek libavformat.a(librtmp.o) : error LNK2019: unresolved external symbol _RTMP_Pause referenced in function _rtmp_read_pause
  &gt; libavformat.a(librtmp.o) : error LNK2019: unresolved external symbol
  &gt; _RTMP_Close referenced in function _rtmp_close libavformat.a(librtmp.o) : error LNK2019: unresolved external symbol
  &gt; _RTMP_Write referenced in function _rtmp_write libavformat.a(librtmp.o) : error LNK2019: unresolved external symbol
  &gt; _RTMP_Read referenced in function _rtmp_read libavformat.a(librtmp.o) : error LNK2019: unresolved external symbol _RTMP_LogSetLevel
  &gt; referenced in function _rtmp_open libavformat.a(librtmp.o) : error
  &gt; LNK2019: unresolved external symbol _RTMP_LogSetCallback referenced in
  &gt; function _rtmp_open libavformat.a(librtmp.o) : error LNK2019:
  &gt; unresolved external symbol _RTMP_Init referenced in function
  &gt; _rtmp_open libavformat.a(librtmp.o) : error LNK2019: unresolved external symbol _RTMP_SetupURL referenced in function _rtmp_open
  &gt; libavformat.a(librtmp.o) : error LNK2019: unresolved external symbol
  &gt; _RTMP_Connect referenced in function _rtmp_open libavformat.a(librtmp.o) : error LNK2019: unresolved external symbol
  &gt; _RTMP_ConnectStream referenced in function _rtmp_open libavformat.a(librtmp.o) : error LNK2019: unresolved external symbol
  &gt; _RTMP_EnableWrite referenced in function _rtmp_open libavutil.a(parseutils.o) : error LNK2019: unresolved external symbol
  &gt; ___strtod referenced in function _av_parse_color libavutil.a(eval.o) : error LNK2001: unresolved external symbol ___strtod
  &gt; libavutil.a(eval.o) : error LNK2019: unresolved external symbol _trunc
  &gt; referenced in function _eval_expr libavutil.a(time.o) : error LNK2019:
  &gt; unresolved external symbol _gettimeofday referenced in function
  &gt; _av_gettime libavutil.a(time.o) : error LNK2019: unresolved external symbol _usleep referenced in function _av_usleep
  </code></pre>
  
  <p>To use the dynamic linking, I copied all the .dll files to the debug floder (where the main executable is created) and changed the main header as follows:</p>
  
  <pre><code>extern "C" 
  {
  #include &lt;stdint.h&gt;
  #include &lt;libavcodec/avcodec.h&gt;
  #include &lt;libavfilter/avfilter.h&gt;
  #include &lt;libavformat/avformat.h&gt;
  #include &lt;libavfilter/avfilter.h&gt;
  #include &lt;libavresample/avresample.h&gt;
  #include &lt;libavutil/avutil.h&gt;
  #include &lt;libswscale/swscale.h&gt;
  
  #pragma comment(lib, "D:/VC Projects/libav/lib/libavutil.dll.a")
  #pragma comment(lib, "D:/VC Projects/libav/lib/libswscale.dll.a")
  #pragma comment(lib, "D:/VC Projects/libav/lib/libavfilter.dll.a")
  #pragma comment(lib, "D:/VC Projects/libav/lib/libavresample.dll.a")
  #pragma comment(lib, "D:/VC Projects/libav/lib/libavcodec.dll.a")
  #pragma comment(lib, "D:/VC Projects/libav/lib/libavdevice.dll.a")
  #pragma comment(lib, "D:/VC Projects/libav/lib/libavformat.dll.a")
  }
  </code></pre>
  
  <p>The project compiled without any error. But while executing it shows an error message "The procedure entry point sws_getContext could not be located in the dynamic link library avutil-52.dll" and exits.</p>
  
  <p>My first objective of linking the static libraries falied so also the dynamic linking.</p>
  
  <p>I am using Visual Studio 2008 and the operating system is Windows XP.</p>
  
  <p>Can someone figureout where I am committing any mistake(s)?</p>
  
  <p>Pani.</p>