title: CodeBlocks SFML audio library will not work
body: <p>I've been following some youtube tutorials for SFML in codeblocks, and we just reached audio. Up until this point, I've only used the graphics aspect but had no issues. Though for audio, I've tried switching from using .ogg to .wav files and back in my code and played around with everything for a while but the program just won't work. I don't really understand how the libraries work (I'm new if that isn't apparent) but I have looked through the lib file of sfml and have every file there in my linker settings, so I don't understand why I continue to get errors. Anyways I am given a ton of errors and would like to simply use the audio part of SFML. Here's all the data you need to crack the case:</p>
  
  <p>Actual Code:</p>
  
  <pre><code>#include &lt;SFML/Graphics.hpp&gt;
  #include &lt;SFML/Audio.hpp&gt;
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  
  int main(){
  
      sf::Vector2i screenDimensions(800,600);
  
      sf::RenderWindow Window;
      Window.create(sf::VideoMode(screenDimensions.x, screenDimensions.y), "A Window");
  
      sf::Clock clock;
  
      sf::SoundBuffer soundBuffer;
      sf::Sound sound;
  
      if(!soundBuffer.loadFromFile("punch.ogg")){
          std::cout &lt;&lt; "Can't find audio file" &lt;&lt; std::endl;
      }
  
      sound.setBuffer(soundBuffer);
  
      float moveSpeed = 10000.0f;
  
      while(Window.isOpen()){
  
          clock.restart();
          sf::Event Event;
          while(Window.pollEvent(Event)){
  
              switch(Event.type){
              case sf::Event::Closed:
                  Window.close();
                  break;
              case sf::Event::KeyPressed:
                  if(Event.key.code == sf::Keyboard::Escape){
                      Window.close();
                  }
                  if(Event.key.code == sf::Keyboard::P){
                      sound.play();
                  }
                  break;
              }
          }
  
          Window.display();
          Window.clear();
          }
  }
  </code></pre>
  
  <p>Linker Settings: (I've tried moving the order around a ton yet it doesn't help)</p>
  
  <pre><code>sfml-audio-s-d
  sfml-network-s-d
  sfml-graphics-s-d
  sfml-window-s-d
  sfml-system-s-d
  flac
  ogg
  vorbis
  vorbisenc
  vorbisfile
  openal32
  jpeg
  freetype
  ws2_32
  gdi32
  opengl32
  winmm
  </code></pre>
  
  <p>And lastly, all of the errors:</p>
  
  <pre><code>E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| more undefined references to `oggpack_write' follow|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_readinit'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_readinit'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| more undefined references to `oggpack_read' follow|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_bytes'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_bytes'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_read'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| more undefined references to `oggpack_read' follow|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_writeinit'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_bytes'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_bytes'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_bytes'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_writeclear'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_writeclear'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_writeinit'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| more undefined references to `oggpack_write' follow|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_bytes'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_bytes'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_bytes'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_reset'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_writeclear'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_bytes'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_bytes'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_bytes'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_reset'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  E:\CODING STUFF FOR C++\zzz.External Libraries\SFML-2.3\lib\libvorbis.a(info.o):info.c|| undefined reference to `oggpack_write'|
  ||More errors follow but not being shown.|
  ||Edit the max errors limit in compiler options...|
  ||=== Build finished: 50 errors, 0 warnings (0 minutes, 2 seconds) ===|
  </code></pre>
  
  <p>thanks in advance :)</p>