Solved

Using MMSYSTEM in Visual C++

Posted on 1998-03-15
6
1,227 Views
Last Modified: 2008-02-01
I am having trouble using the Windows Multimedia System (waveInOpen and such functions) under Visual C++. The code compiles OK, but does not link. When I try to link I get the following error messages:

RecordDlg.obj : error LNK2001: unresolved external symbol __imp__waveInClose@4
RecordDlg.obj : error LNK2001: unresolved external symbol __imp__waveInReset@4
RecordDlg.obj : error LNK2001: unresolved external symbol __imp__waveInOpen@24
RecordDlg.obj : error LNK2001: unresolved external symbol __imp__waveInAddBuffer@12
RecordDlg.obj : error LNK2001: unresolved external symbol __imp__waveInUnprepareHeader@12
RecordDlg.obj : error LNK2001: unresolved external symbol __imp__waveInPrepareHeader@12
RecordDlg.obj : error LNK2001: unresolved external symbol __imp__waveInStart@4
Debug/Amuse.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.

I understand that the compiler is unable to resolve the external references, probably because there is no import library for the MMSYSTEM.DLL file. How can I solve this problem?
0
Comment
Question by:Slarti
[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
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:jtwine100697
ID: 1183491
  Add mmsystem.lib to your linker library list.

-=- James.
0
 

Expert Comment

by:larockd
ID: 1183492
James,

Actually you have the wrong library.  The library to be added is
winmm.lib

Below is the information... On the function

waveInStart
 
Windows NT
 Yes
 
Win95
 Yes
 
Win32s
 Yes
 
Import Library
 winmm.lib
 
Header File
 mmsystem.h
 
Unicode
 No
 
Platform Notes
 None
 

0
 
LVL 4

Expert Comment

by:jtwine100697
ID: 1183493
 Yep...  Yer right!   That is what I get for answering when I am not at my development machine... :P

   Slarti, reject my previous answer.  "larockd" deserves the points.

-=- James.
0
Technology Partners: 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!

 
LVL 2

Author Comment

by:Slarti
ID: 1183494
Sorry jtwine.. Of course the first thing I tried was to include mmsystem.lib but the file does not exist. I was not aware that the import library name was listed in the online help of the function, so larockd's answer really deserves the points.

Larockd: Please post a blank answer so I can accept it.
0
 
LVL 4

Expert Comment

by:jtwine100697
ID: 1183495
  That is what I said...  It is not? :P

-=- James.
0
 

Accepted Solution

by:
larockd earned 50 total points
ID: 1183496
Jtwine...

Thanks....

Darrell



0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
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…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

623 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