0
/*
Blazeit.cpp
*/
#include <iostream>
#include <Windows.h>
#include <MMSystem.h>
using namespace std;
int main()
{
   cout<<PlaySound(TEXT("Smoke_Weed_Everyday.wav"),NULL,SND_SYNC);
 system("pause");
return 0;
}

So I'm trying to get a sound file to play with the above code and I need to import winmm.lib so I can play the sound, but when I try to import the library I get this little yellow triangle with an exclamation point in it. Am I importing wrong or is there something wrong with my code?

Sorry if this is an obvious question I've only being programming c++ for a week now, and don't even have the vocabulary to google this my self.

Also don't question why I'm trying to play a file called "Smoke_Weed_Everyday.wav".

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
  • [may be helpful.](http://stackoverflow.com/questions/26762013/where-can-i-find-winmm-lib-im-using-visual-studio-2012) Basically, the library might not be where eclipse thinks it is. You might have to track down the directory winmm.lib is hiding in on your PC and add that folder on the Library Paths tab right beside where you added the library. – user4581301 May 08 '15 at 22:59
  • On second thought, try removing the `.lib` from the Library. – user4581301 May 08 '15 at 23:03

0 Answers0