This is the mail archive of the cygwin@sourceware.cygnus.com 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[SMTP:george2@ccs.neu.edu] 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.

-- Colin Peters - colin@bird.fu.is.saga-u.ac.jp
-- Saga University Dept. of Information Science
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/

-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" 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]