Playing .wav files

I am having trouble getting this to build successfully.

//program plays simple .wav file
#include // mciSendString()
#pragma comment(lib,"winmm.lib")

using namespace std;

int main()
string input;
cout << "Plays ding.wav music file in" << endl;
cout << "the windows media directory from this project folder...";

// plays the sound from the project folder of the program
PlaySound(TEXT("ding.wav"), NULL, SND_FILENAME | SND_ASYNC);

return 0;

I keep getting: 1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol [email protected] referenced in function ___tmainCRTStartup
as an error in the build log.
Any ideas?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!