Play a sound in DevC++

This is a discussion on Play a sound in DevC++ within the Windows Programming forums, part of the Platform Specific Boards category; I have been fighting with this for so long now. How do you make a program that plays a wave ...

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Unhappy Play a sound in DevC++

    I have been fighting with this for so long now.

    How do you make a program that plays a wave or midi file using DevC++?! I have tried many ways of using PlaySound(), but an unresolvable error keeps poping up, it has somthing to do with refrence link @PlaSound12 or somthing like that. But no matter how much I search I can't find someone with the same problem let alone the answer. Could somone PLEASE help me out?

    Thanks in advance, August

  2. #2
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    Nevermind! I figured it out!

    I had to put the switch -lwinmm in under the progect options!
    I learned that by searching for "PlaySound", then the file "libwinmm.a" popped up, from there it was obveius.

  3. #3
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    I glad you found this out.. because I fooled around with this for many days and couldn't get any sound to work.. and eventually lost interest in adding sounds.
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectX Question
    By bladerunner627 in forum Game Programming
    Replies: 2
    Last Post: 04-04-2005, 11:55 AM
  2. Low latency sound effects
    By VirtualAce in forum Game Programming
    Replies: 0
    Last Post: 12-21-2004, 12:58 AM
  3. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 11:38 AM
  4. Gui Class With Tic Tac Toe
    By xxYukoxx in forum C++ Programming
    Replies: 1
    Last Post: 06-01-2003, 04:28 PM
  5. sounds?
    By BODYBUILDNERD in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2002, 02:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21