Thread: Playing wave file, error - can't understand

  1. #1
    R
    Guest

    Unhappy Playing wave file, error - can't understand

    When i add any of following functions

    PlaySound("fileName", 0, 0);

    or

    PlaySound("Type.wav", 0, SND_FILENAME);

    or

    sndPlaySound("fileName",SND_SYNC);


    i get

    error LNK2001: unresolved external symbol __imp__sndPlaySoundA@8
    Debug/sd.exe : fatal error LNK1120: 1 unresolved externals

    And i can't make any sense of it. please help me out?

    just want' to play wav files.

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    Did you link it together with winmm.lib and included 'mmsystem.h'?
    // Gliptic

  3. #3
    R
    Guest
    how would i check if

    winmm.lib

    is being used.

    But i am including 'mmsystem.h'?

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    I don't know which compiler you are using but you have to link winmm.lib to the exe-file.
    // Gliptic

  5. #5
    R
    Guest
    Visual C++ 6 on 98.

    how would i link winmm.lib.

  6. #6
    Unregistered
    Guest

    Thumbs up

    Project ---> Settings ---> The "Link" tab ---> In the "Project
    "Options" textbox type in: winmm.lib

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. sequential file program
    By needhelpbad in forum C Programming
    Replies: 80
    Last Post: 06-08-2008, 01:04 PM
  3. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 04:14 AM
  4. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  5. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM