Subject: RE: Linking in InitiateSystemShutdown()...
From: [email-masked] (Sergey Okhapkin)

25 Jan 1997 13:47:33 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <01BC0B0E.9DDFD170.cygnus.gnu-win32@sos>
Original-To: "[email-masked]" <[email-masked]>,
        "[email-masked]'"
	 <[email-masked]>
Encoding: 28 TEXT
Original-Sender: [email-masked]

Ryan C. Gordon wrote:
> Ok, forgive a potentially stupid question, but in an attempt to 
> figure out how the API InitiateSystemShutdown() works, I wrote an 
> incredibly simplistic program...here it is:
> 
> 
> #include <windows.h>
> 
> int main(void)
> {
>     InitiateSystemShutdown(NULL, "REBOOOOOOOT!", 5, FALSE, TRUE);
>     return(0);
> }
> 
> 
> Now, when compiling, I get this:
> 
> C:\2\C>gcc testshutdown.c -o testshutdown.exe
> 
> C:\WINDOWS\TEMP/cc0010001.o(.text+0x26):testshutdown.c: undefined reference to `
> InitiateSystemShutdownA@20'

Try gcc testshutdown.c -o testshutdown.exe -ladvapi32.

-- 
Sergey Okhapkin
Moscow, Russia
Looking for a job

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".