Newbie: can't manage some types...

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Oct 31 09:06:48 PDT 2016


On Monday, 31 October 2016 at 14:02:01 UTC, Cleverson Casarin 
Uliana wrote:
>  Error 42: Symbol Undefined _PlaySoundW at 12


This is the most common linker error, it means you used a 
function without including the library.

PlaySound's docs

https://msdn.microsoft.com/en-us/library/windows/desktop/dd743680%28v=vs.85%29.aspx

at the bottom list some facts about it. One is "Library - 
winmm.lib"

When you use that function, gotta include the library file 
somehow. Easiest is to just list it on your compile command:

dmd yourfile.d winmm.lib

since winmm.lib is provided with the operating system, that 
should just work.


More information about the Digitalmars-d-learn mailing list