Solved

Using MMSYSTEM in Visual C++

Posted on 1998-03-15
6
1,178 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
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.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now