title: libav - undefined reference to 'av_frame_alloc' and more
body: <p>I am trying to compile this tutorial from the libav doc: <a href="http://ffmpeg.org/doxygen/trunk/doc_2examples_2decoding__encoding_8c-example.html" rel="nofollow noreferrer">link</a></p>
  <p>I changed nothing on the code!</p>
  <p>But when I compile it with:</p>
  <pre><code>gcc test.c -lavformat -lswscale -lavdevice -lavformat -lavcodec -lavutil -lpthread -lm -o example
  </code></pre>
  <p>I get these errors:</p>
  <pre><code>undefined reference to `check_sample_fmt'
  undefined reference to `select_sample_rate'
  undefined reference to `select_channel_layout'
  undefined reference to `av_frame_alloc'
  undefined reference to `av_frame_free'
  </code></pre>
  <p>Searching Dr.google I read that it maybe has something to do with the linking order of the libs. But I did not found the correct one yet?!</p>
  <p>EDIT:
  this 'possible dublicate' seems not to be related to my problem</p>