title: Problem encoding wav into ogg vorbis
body: <p>I have an MFC application. I have audio data stored in wav format. My question is, how can I encode an array of those bytes into an ogg vorbis format? </p>
  
  <p>I found an example:</p>
  
  <p><a href="http://svn.xiph.org/trunk/vorbis/examples/encoder_example.c" rel="nofollow">http://svn.xiph.org/trunk/vorbis/examples/encoder_example.c</a></p>
  
  <p>and tried to use it in my application. 
  First, I tried to add it to my project and compile. I had to add files included in the above file, so I found them in the libraries libvorbis and libogg. And still I cannot link:</p>
  
  <pre><code>Error 4 error LNK2019: unresolved external symbol _oggpack_writetrunc referenced in function _vorbis_bitrate_addblock bitrate.obj
  Error 2 error LNK2019: unresolved external symbol _oggpack_write referenced in function _vorbis_bitrate_addblock bitrate.obj
  Error 8 error LNK2019: unresolved external symbol _oggpack_read referenced in function _vorbis_staticbook_unpack codebook.obj
  Error 10 error LNK2019: unresolved external symbol _oggpack_look referenced in function _decode_packed_entry_number codebook.obj
  Error 7 error LNK2019: unresolved external symbol _oggpack_get_buffer referenced in function _vorbis_bitrate_flushpacket bitrate.obj
  Error 5 error LNK2019: unresolved external symbol _oggpack_bytes referenced in function _vorbis_bitrate_addblock bitrate.obj
  Error 9 error LNK2019: unresolved external symbol _oggpack_adv referenced in function _decode_packed_entry_number codebook.obj
  Error 3 error LNK2001: unresolved external symbol _oggpack_write codebook.obj
  Error 6 error LNK2001: unresolved external symbol _oggpack_bytes codebook.obj
  </code></pre>
  
  <p>I could not find where those guys are defined.
  I would appreciate any help.</p>
  
  <p>Thanks. </p>