Playing .wav files

I am having trouble getting this to build successfully.

[code]
//program plays simple .wav file
#include
#include
#include // mciSendString()
#include
#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);

system("PAUSE");
return 0;
}[/code]

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!

Categories