Advertisement

PlaySound woes

Started by July 26, 2000 03:47 AM
1 comment, last by ZedAgent 24 years, 4 months ago
So... my coding is going great, been able to fix all the problems I've run into so far (thanks to you guys for that ), and now it's time to implement some sound... and of course it doesn't work I #include'd <mmsystem.h>, and compiled to make sure I didn't get any weird errors for some reason or another. No errors, program works perfectly. I then put in an innocent little PlaySound command, as such: PlaySound("BLIP.WAV",NULL,SND_FILENAME | SND_ASYNC); I then compile, and suddenly, to my dismay, the following 2 errors pop up: main.obj : error LNK2001: unresolved external symbol __imp__PlaySoundA@12 Debug/winadam.exe : fatal error LNK1120: 1 unresolved externals I was informed that I also had to insert the WINMM.LIB library into my project, and at first thought that was the problem... however, the directory that it's in is in fact loaded under the VC++ options. So what could it be? Edited by - ZedAgent on 7/26/00 3:48:19 AM
maybe you haven''t included dsound.lib in your link list...
and just because a lib is in a link directory doesn''t necessarily mean it will get linked to your project... just add it and dsound.lib to your link list and see if that works (that''s in Project->Settings...->Link)
[email=ehremo@hotmail.com][/email]
Advertisement
Excellent, that did it! Strange, I was unaware of the project Link options... I was under the impression that all the .lib files under the directories specified in the VC++ options would automatically be included in your project... well now I know better! Thanks a ton!

-Zed

This topic is closed to new replies.

Advertisement