Playing .wav files - Programmers Heaven

Howdy, Stranger!

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

Categories

Playing .wav files

jbarrjbarr Posts: 1Member
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 _WinMain@16 referenced in function ___tmainCRTStartup
as an error in the build log.
Any ideas?

Sign In or Register to comment.