Jump to content
Fórum Script Brasil
  • 0

Executar um .wav (resolvido)


Pedro Warlock
 Share

Question

Olá. Eu sou novo no ramo de C/C++ e estou aprendendo pouco a pouco.

Eu estou com um problema de executar um arquivo .wav. Fiz o seguinte

Usei o include windows.h como foi dito nos requisitos da microsoft para usar essa função e usei o "sndPlaySoundA" e na hora de compilar fica dando indefinida referencia para "sndPlaySoundA"

#include <windows.h> 
#include <mmsystem.h>  //testei com esse include também, mas nada de funcionar.

sndPlaySoundA( ".\\auxiliar\\som\\coin.wav", SND_ASYNC || SND_NODEFAULT );     

Tentei também....PlaySound(TEXT(".\\auxiliar\\som\\coin.wav"), NULL, SND_SYNC);  e nada...

wYg9gV2.png

 

 

Resolvido!

Adicionei um linker "-lwinmm" e funcionou normalmente. Não entendo nada de linker

Edited by Pedro Warlock
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      149.6k
    • Total Posts
      646.1k
×
×
  • Create New...