Re: compilation fails with Win32 API call

2011-09-20 Thread Andrew Schulman
> On 2011-09-20 PM 6:12, Andrew Schulman wrote: > > I'm trying to compile a program that calls the win32 function > > SetThreadExecutionState, in kernel32.dll [1]. The link step fails: > > please define WINVER so that you can get definition what you want > (gcc -E -DWINVER=0x500 - < #include > EO

Re: compilation fails with Win32 API call

2011-09-20 Thread jojelino
On 2011-09-20 PM 6:12, Andrew Schulman wrote: I'm trying to compile a program that calls the win32 function SetThreadExecutionState, in kernel32.dll [1]. The link step fails: $ gcc -c nosleep.c $ gcc -o nosleep nosleep.o -lkernel32 nosleep.o:nosleep.c:(.text+0x1f): undefined reference to `_SetT

Re: compilation fails with Win32 API call

2011-09-20 Thread JonY
On 9/20/2011 17:12, Andrew Schulman wrote: > I'm trying to compile a program that calls the win32 function > SetThreadExecutionState, in kernel32.dll [1]. The link step fails: > > $ gcc -c nosleep.c > $ gcc -o nosleep nosleep.o -lkernel32 > nosleep.o:nosleep.c:(.text+0x1f): undefined reference to

compilation fails with Win32 API call

2011-09-20 Thread Andrew Schulman
I'm trying to compile a program that calls the win32 function SetThreadExecutionState, in kernel32.dll [1]. The link step fails: $ gcc -c nosleep.c $ gcc -o nosleep nosleep.o -lkernel32 nosleep.o:nosleep.c:(.text+0x1f): undefined reference to `_SetThreadExecutionState' nosleep.o:nosleep.c:(.text+