Subject: RE: libwinmm.a
From: [email-masked] (Colin Peters)

27 Mar 1997 00:42:53 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <01BC39F2.3CDCBF60.cygnus.gnu-win32@gbird0>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Original-To: "'George Kechriotis'" <[email-masked]>
Original-Cc: "'GNU-Win32'" <[email-masked]>
Original-Sender: [email-masked]

George Kechriotis[SMTP:[email-masked]] 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 - [email-masked]
-- 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
"[email-masked]" with one line of text: "help".