Simple way to play sounds using D

Murilo murilomiranda92 at hotmail.com
Tue Feb 5 17:22:15 UTC 2019


On Tuesday, 5 February 2019 at 17:14:05 UTC, Adam D. Ruppe wrote:
> On Tuesday, 5 February 2019 at 17:09:10 UTC, Murilo wrote:
>> When I compile the code above the compiler says Error: linker 
>> exited with status 1
>> What should I do?
>
> It might have to be "shoot.wav"w, notice the w on the end.
>
> But I am guessing the main problem is not linking in the winmm 
> lib and dll. It will probably work to add
>
> pragma(lib, "winmm");
>
> to your file right after the import.

You were right :) No need for the w but it was necessary the 
pragma(lib, "winmm");

It worked! Thanks so much man, all the best to you.


More information about the Digitalmars-d-learn mailing list