Hi everyone. I'm not sure if this is the correct forum for my question, but here goes. I've been working on a program using Windows API. I'm attempting to play a sound file when the program opens, using this function:
|
PlaySound(TEXT("Startrek.wav"), NULL, SND_FILENAME | SND_ASYNC);
|
When I compile the program, I get this error:
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol __imp__PlaySoundW@12 referenced in function "long __stdcall WinProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WinProc@@YGJPAUHWND__@@IIJ@Z) First Window C:\Users\Matthew\Documents\Visual Studio 2015\Projects\First Window\First Window\First Widow 2.1.4.obj 1
Here's what's interesting. I have a example program from the book I'm studying. This program plays a wav file that says, "Hello World!" upon running the program. Originally, this program used to function as intended. However, now, it only plays a Windows sound, rather than the "Hello World" wav file. So, my question is, this sounds like it's more a problem with my computer, not my program itself. Does anyone have any suggestions as to where I should start to fix this problem?