title: Lots of errors when compiling project using FMOD with MinGW
body: <p>I decided to use FMOD for sound playback in my project, but I'm getting lots of compiler errors which I am unsure of how to fix.</p>
  
  <p>The header file of the class using FMOD looks more or less like this:</p>
  
  <pre class="lang-c prettyprint-override"><code>#ifndef PROJECTNAME_SOUNDMANAGER_H_
  #define PROJECTNAME_SOUNDMANAGER_H_
  
  #include &lt;iostream&gt;
  
  #include &lt;fmod.h&gt;
  #include &lt;fmod.hpp&gt;
  #include &lt;fmod_errors.h&gt;
  
  class SoundManager {
      public:
          static SoundManager &amp;instance();
          void play(char *data, size_t size, bool loop=false);
          void stopAll();
      private:
          void ERRCHECK(FMOD_RESULT result);
          SoundManager() : mSystem(nullptr) {
              initFMOD();
          }
          SoundManager(const SoundManager &amp;other);
          SoundManager &amp;operator=(const SoundManager &amp;other);
          void initFMOD();
          FMOD::System *mSystem;
          FMOD::Sound *mSound;
          FMOD::Channel *mSoundChannel;
  };
  
  #endif // PROJECTNAME_SOUNDMANAGER_H_
  </code></pre>
  
  <p>And here are some of the compilation errors:</p>
  
  <pre><code>...../api/inc/fmod.h:1054:33: error: expected ')' before '*' token
  ...../api/inc/fmod.h:1056:33: error: expected ')' before '*' token
  ...../api/inc/fmod.h:1058:33: error: expected ')' before '*' token
  ...../api/inc/fmod.h:1059:33: error: expected ')' before '*' token
  .....
  ...../api/inc/fmod.h:1465:5: error: 'FMOD_SOUND_PCMREADCALLBACK' does not name a type
  ...../api/inc/fmod.h:1466:5: error: 'FMOD_SOUND_PCMSETPOSCALLBACK' does not name a type
  ...../api/inc/fmod.h:1467:5: error: 'FMOD_SOUND_NONBLOCKCALLBACK' does not name a type
  ...../api/inc/fmod.h:1473:5: error: 'FMOD_FILE_OPENCALLBACK' does not name a type
  .....
  ...../api/inc/fmod.h:1828:19: error: expected initializer before 'FMOD_Memory_GetStats'
  ...../api/inc/fmod.h:1829:19: error: expected initializer before 'FMOD_Debug_SetLevel'
  ...../api/inc/fmod.h:1830:19: error: expected initializer before 'FMOD_Debug_GetLevel'
  ...../api/inc/fmod.h:1831:19: error: expected initializer before 'FMOD_File_SetDiskBusy'
  .....
  ...../api/inc/fmod.hpp:59:21: error: expected ';' at end of member declaration
  ...../api/inc/fmod.hpp:59:51: error: ISO C++ forbids declaration of 'release' with no type [-fpermissive]
  ...../api/inc/fmod.hpp:62:21: error: expected ';' at end of member declaration
  ...../api/inc/fmod.hpp:62:21: error: declaration of 'FMOD_RESULT FMOD::System::_stdcall'
  ...../api/inc/fmod.hpp:59:21: error: conflicts with previous declaration 'FMOD_RESULT FMOD::System::_stdcall'
  ...../api/inc/fmod.hpp:62:73: error: ISO C++ forbids declaration of 'setOutput' with no type [-fpermissive]
  ...../api/inc/fmod.hpp:63:21: error: expected ';' at end of member declaration
  ...../api/inc/fmod.hpp:63:21: error: declaration of 'FMOD_RESULT FMOD::System::_stdcall'
  ...../api/inc/fmod.hpp:59:21: error: conflicts with previous declaration 'FMOD_RESULT FMOD::System::_stdcall'
  .....
  </code></pre>
  
  <p>If it makes any difference, I'm compiling with <code>-std=c++0x</code>.</p>
  
  <p>I've tried searching but I wasn't able to find anything that helps me with these errors.</p>
  
  <p>Please note that I'm using FMOD Ex 4.44.06.</p>
  
  <p><strong>EDIT:</strong> I seem to have found the problem. When I make a minimal example and compile it without <code>-std=c++0x</code>, everything compiles fine. However, if I add that flag, I get the same errors as with this project. Is there no way to make FMOD play nice with C++11?</p>