Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using MMSYSTEM in Visual C++

Posted on 1998-03-15
6
Medium Priority
?
1,245 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 200 total points
ID: 1183496
Jtwine...

Thanks....

Darrell



0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

  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 …
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 viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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.
Suggested Courses

705 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