Solved

PlaySound Problems

Posted on 1998-07-16
4
264 Views
Last Modified: 2010-04-10
I am using Visual C++ and am simply trying to play a .WAV file when certain actions are performed. I have the syntax all down, but when I try to compile I get unresolved external linkage errors.

error LNK2001: unresolved external symbol __imp__PlaySoundA@12

Please help me with this...
Reply to dereks@shaw.wave.ca
0
Comment
Question by:Dsweet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:warmcat
ID: 1167982
Hi sweetie -

You need to link with winmm.lib... mine is at

\Microsoft\Dev Studio\Vc\lib\Winmm.lib

-Andy
0
 

Author Comment

by:Dsweet
ID: 1167983
I have winmm.lib in the directory :

/Program Files/DevStudio/VC/LIB

And this is the first entry listed in my Tool->Options->Directories->Lib Files, yet I still get an unresolved linkage error.
0
 
LVL 2

Accepted Solution

by:
warmcat earned 200 total points
ID: 1167984
No wonder you do, sweets, you have to add the library to your project just as if it was a .c file; ie, it must appear on the FileView tab along with your other sources.

Use Project|Add to project|Files... to do this.


0
 

Author Comment

by:Dsweet
ID: 1167985
Excellent job my man!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question