Slarti
asked on
Using MMSYSTEM in Visual C++
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__waveInUnprepareHead er@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?
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__waveInUnprepareHead
RecordDlg.obj : error LNK2001: unresolved external symbol __imp__waveInPrepareHeader
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?
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
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
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.
Slarti, reject my previous answer. "larockd" deserves the points.
-=- James.
ASKER
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.
Larockd: Please post a blank answer so I can accept it.
That is what I said... It is not? :P
-=- James.
-=- James.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
-=- James.