Solved

PlaySound Problems

Posted on 1998-07-16
4
262 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
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

680 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