compilation fails with Win32 API call

Andrew Schulman schulman.andrew@epamail.epa.gov
Tue Sep 20 17:49:00 GMT 2011


> 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 - <<EOF
> #include <windows.h>
> EOF
> )|grep SetThreadExecution

Thanks jojelino, and JonY too.  -DWINVER=0x500 did the trick.
Andrew.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list