|
-
Nov 13th, 2001, 09:52 PM
#1
Thread Starter
Addicted Member
mciSendString
Hello,
I use the API mciSendString to play a song, but each time I got this error:
MCISendString.obj : error LNK2001: unresolved external symbol __imp__mciSendStringA@16
Here the code I use:
PHP Code:
mciSendString("open c:\\test.wav type waveaudio alias test", 0, 0, NULL);
mciSendString("play test from 0", 0, 0, NULL);
Why am I getting this error? Anyone can help.
-
Nov 13th, 2001, 10:01 PM
#2
PowerPoster
Check your included libraries in your project. Make sure,
Winmm.lib
is also there.
-
Nov 13th, 2001, 11:00 PM
#3
Thread Starter
Addicted Member
You are right, I thought we only had to include the windows.h to use any API call.
-
Nov 14th, 2001, 03:05 PM
#4
Monday Morning Lunatic
windows.h is sufficient to tell the COMPILER what functions are used.
However, the linker, when it resolves all the names, uses the .lib files to work out where to get the program code from, or what DLL the function resides in. This is where it cannot find the name from, until you tell it to also search in winmm.lib
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|