Originally Posted by Amarina I PUT THE FOLLOWING CODE TO PLAY SOUNDS... BUT I GOT 1 ERROR... PLEASE HELP ME!!! Code: #include <windows.h> //#include <winmm.lib> #include <mmsystem.h> #include <conio.h> using namespace std ; int main() { PlaySound(TEXT("test.wav"), NULL, SND_ALIAS | SND_APPLICATION); return 0 ; } THIS IS THE ERROR!!! Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\Makefile.win" all g++.exe -c "sonidos 3.cpp" -o "sonidos 3.o" -nostdlib g++.exe "sonidos 3.o" -o "sonidos3.exe" -mwindows winmm.lib -lobjc -nostdlib g++.exe: winmm.lib: No such file or directory make.exe: *** [sonidos3.exe] Error 1 Execution terminated PLEASE HELP ME!!! I think post #9 in this thread gives you the answer to your problem. You shouldn't bump old threads, and you should definitely read the old thread before bumping it.
#include <windows.h> //#include <winmm.lib> #include <mmsystem.h> #include <conio.h> using namespace std ; int main() { PlaySound(TEXT("test.wav"), NULL, SND_ALIAS | SND_APPLICATION); return 0 ; }
bit∙hub [bit-huhb] n. A source and destination for information.
Originally Posted by cangel Yes... I use visual studio 2005 Make sure you are not creating a windows project. Create a console/empty project and your code will work.
Spidey out!