Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

PlaySound Problems

Posted on 1998-07-16
4
Medium Priority
?
271 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 800 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

649 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