title: Using winmm library in C
body: <p>i'm trying to make a program in which I can play music i.e mp3 files.I'm trying to do this by using the winmm library.At first when i tried linking it,the compiler gave errors from which i realized that the program hadn't been linked properly with the library but then i added the library file in the linker settings and now the program executes fine(no errors-suggesting that it has been linked properly) but no music is played.I can't figure out what the problem is.I'm currently using codeblocks,which uses gcc compiler.Can anyone explain what the problem is and why the music isn't playing? I'd be grateful if anyone can help me out! :)</p>
  
  <p>my code(it simply prints the text but no music is played):</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #pragma comment (lib, "winmm.a")
  #include &lt;windows.h&gt;
  #include &lt;mmsystem.h&gt;
  
  
  int main()
  {
      printf("Hello world!\n");
  
      mciSendString("play song.mp3",NULL,NULL,NULL);
  
      printf("\nY");
  
      mciSendString("pause song.mp3",NULL,NULL,NULL);
      mciSendString("close song.mp3",NULL,NULL,NULL);
  
      printf("\ndone");
  
     return 0;
  }
  </code></pre>