* Undefined Reference??
@ 1997-08-31 13:43 Mark Koi
1997-09-01 18:30 ` Jan-Jaap van der Heijden
1997-09-01 18:30 ` Mikey
0 siblings, 2 replies; 3+ messages in thread
From: Mark Koi @ 1997-08-31 13:43 UTC (permalink / raw)
To: gnu-win32
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@16'
GCC.EXE: Internal compiler error: program ld got fatal signal 1
koi@ssa.crane.navy.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@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Undefined Reference??
1997-08-31 13:43 Undefined Reference?? Mark Koi
1997-09-01 18:30 ` Jan-Jaap van der Heijden
@ 1997-09-01 18:30 ` Mikey
1 sibling, 0 replies; 3+ messages in thread
From: Mikey @ 1997-09-01 18:30 UTC (permalink / raw)
To: Mark Koi, gnu-win32
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@16'
>GCC.EXE: Internal compiler error: program ld got fatal signal 1
>
>
>koi@ssa.crane.navy.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@cygnus.com" with one line of text: "help".
>
(jeffdbREMOVETHIS@netzone.com)
delete REMOVETHIS from the above to reply
Mikey
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Undefined Reference??
1997-08-31 13:43 Undefined Reference?? Mark Koi
@ 1997-09-01 18:30 ` Jan-Jaap van der Heijden
1997-09-01 18:30 ` Mikey
1 sibling, 0 replies; 3+ messages in thread
From: Jan-Jaap van der Heijden @ 1997-09-01 18:30 UTC (permalink / raw)
To: Mark Koi; +Cc: gnu-win32
On Thu, 28 Aug 1997, Mark Koi 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
Make that:
gcc -o myprg.exe myprg.c -luser32
SetTimer is impemented in libuser32.a
Greetings,
JJ
---
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead. -- RFC1925.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1997-09-01 18:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-31 13:43 Undefined Reference?? Mark Koi
1997-09-01 18:30 ` Jan-Jaap van der Heijden
1997-09-01 18:30 ` Mikey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).