This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Problem with libwinmm.a win32 library?
- From: "Fish" <fish at infidels dot org>
- To: "Cygwin" <cygwin at cygwin dot com>
- Date: Fri, 19 Jul 2002 13:59:27 -0700
- Subject: Problem with libwinmm.a win32 library?
- Reply-to: <dtrout at sprintmail dot com>
I'm trying to write a program in cygwin that uses some multimedia timer
functions and it won't link. Keeps saying it can't find the APIs even though
they're there (or *appear* to be anyway):
=============================
#include <windows.h>
#include <mmsystem.h>
int main (int argc, char* argv[])
{
timeBeginPeriod(1);
timeEndPeriod(1);
return 0;
}
----------------------------
gcc -DWIN32 -D_WIN32 -Wall -malign-double -O3 -o fishtest.o -c
fishtest.c -Wa,-adhln=fishtest.c.listing.doc
gcc -lwinmm -Xlinker -Map -Xlinker fishtest.linkmap.doc -o fishtest fishtest.o
fishtest.o(.text+0x11):fishtest.c: undefined reference to `timeBeginPeriod@4'
fishtest.o(.text+0x18):fishtest.c: undefined reference to `timeEndPeriod@4'
collect2: ld returned 1 exit status
make: *** [fishtest] Error 1
----------------------------
Administrator@CENSORED /lib/w32api
$ nm libwinmm.a | grep timeBeginPeriod
00000000 I __imp__timeBeginPeriod@4
00000000 T _timeBeginPeriod@4
=============================
Does anyone have any idea what's going on?
Thanks.
--
"Fish" (David B. Trout)
fish@infidels.org
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/