Code:
#include <windows.h>
#include <mmsystem.h>
#include <stdio.h>
#include <conio.h>
#include <Winmm.lib>
#pragma comment(lib, "Winmm.lib")
int main()
{
printf("test sound");
PlaySound("C:\1.wav",NULL,SND_ASYNC|SND_FILENAME);
Sleep(1000);
return 0;
getch();
}
error
winmm.lib:no such file or diretory
[Build Error][C:/testsound.o]Error1
or
Code:
#include <windows.h>
#include <mmsystem.h>
#include <stdio.h>
#include <conio.h>
#pragma comment(lib, "Winmm.lib")
int main()
{
printf("test sound");
PlaySound("C:\1.wav",NULL,SND_ASYNC|SND_FILENAME);
Sleep(1000);
return 0;
getch();
}
compile Done but build exe
file exe 16 kb but wav 50mb
I run exe.....Nothing happens
\ in strings needs to be escaped. Use / or \\ instead.
Quzah.
thank you.i play done.But
I want to play without sound WAV On the computer.
Exe is just a play
I want WAV and exe mixed.
help me plaese
Last issue