Solved

Using MMSYSTEM in Visual C++

Posted on 1998-03-15
6
1,163 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
Comment Utility
  Add mmsystem.lib to your linker library list.

-=- James.
0
 

Expert Comment

by:larockd
Comment Utility
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
Comment Utility
 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Author Comment

by:Slarti
Comment Utility
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
Comment Utility
  That is what I said...  It is not? :P

-=- James.
0
 

Accepted Solution

by:
larockd earned 50 total points
Comment Utility
Jtwine...

Thanks....

Darrell



0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

762 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

8 Experts available now in Live!

Get 1:1 Help Now