delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/09/02/02:07:21

From: jeffdbREMOVETHIS AT netzone DOT com (Mikey)
Subject: Re: Undefined Reference??
2 Sep 1997 02:07:21 -0700 :
Sender: mail AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <340b19f3.9816872.cygnus.gnu-win32@smtp.netzone.com>
References: <ko1SvpNz0001E1sFU1 AT stoneaxe>
Reply-To: jeffdbREMOVETHIS AT netzone DOT com
Original-To: Mark Koi <koi AT ssa DOT crane DOT navy DOT mil>, gnu-win32 AT cygnus DOT com
In-Reply-To: <ko1SvpNz0001E1sFU1@stoneaxe>
X-Mailer: Forte Agent 1.01/32.397
MIME-Version: 1.0
Original-Sender: owner-gnu-win32 AT cygnus DOT com

For cygwin32 use 

-mwindows (to get -luser32 -lgdi32)

for mingw32 use 

-windows

SetTimer is in user32.dll

On Thu, 28 Aug 1997 16:34:45 -0500 (EST), you wrote:

>I have installed both gnu-win32 and mingw32 but both
>packages give me the same error.  It must be an option
>or something.  My brain is fried.
>
>gcc -o myprg.exe myprg.c
>
>Error:
>c:\windows\temp\cc9350811.o   : undefined reference to 'SetTimer AT 16'
>GCC.EXE: Internal compiler error: program ld got fatal signal 1
>
>
>koi AT ssa DOT crane DOT navy DOT mil
>
>
>program:
>-------------------------------------------------------
>
>#include <stdio.h>
>#include <windows.h>
>
>VOID
>CALLBACK handler(HWND hwnd, UINT umsg, UINT id, DWORD dwTime)
>{
>   fprintf(stdout,"Callback invoked dwTime=%d\n",dwTime);
>}
>
>int
>main(int argc, char **argv)
>{
>    UINT cc;
>
>    cc=SetTimer(NULL, 0, 500, (TIMERPROC) handler);
>    if (cc == 0) {
>       fprintf(stderr,"SetTimer failed\n");
>       exit(-1);
>    }
>    fprintf(stdout,"Created timer succesfull\n");
>    Sleep(10000);
>    fprintf(stdout,"After sleep \n");
>}
>-
>For help on using this list (especially unsubscribing), send a message to
>"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
>

(jeffdbREMOVETHIS AT netzone DOT com)
delete REMOVETHIS from the above to reply
         Mikey
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019