This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: libwinmm.a

George Kechriotis[] wrote:
>I'm trying to compile a code that uses the waveInGetNumDevs 
>call (multimedia). I checked in libwinmm.a and it seems that 
>this function is there. However when I compile the code
>it can not resolve the function call. I tried gcc -lwinmm 
>but no luck either. Has anyone tried something similar?

-lwinmm is the right option, but you need to have the
correct prototype for waveInGetNumDevs. Unfortunately
the current win32-api headers do not include that. The
prototype is:

UINT WINAPI waveInGetNumDevs ();

Seems pretty simple, but in the win32-api include file
base.h (included from windows.h) WINAPI is set (indirectly)
to __attribute__ ((stdcall)), which is important for telling
gcc how to properly mangle the name to get the name actually
in libwinmm.a (doing an nm libwinmm.a | grep waveInGetNumDevs
shows you the mangled form, with an @0 at the end).

Eventually I, you, or someone is going to end up writing a
complete version of mmsystem.h with this and the other
definitions for multi-media under Win32, but it hasn't
happened yet (unfortunately).


-- Colin Peters -
-- Saga University Dept. of Information Science

For help on using this list, send a message to
"" with one line of text: "help".

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]