This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
LockWorkStation()
- To: "Cygwin List" <cygwin at sources dot redhat dot com>
- Subject: LockWorkStation()
- From: "Jonas Jensen" <bones0_list at hotmail dot com>
- Date: Sat, 26 Aug 2000 13:16:42 +0200
I'm trying to compile the following program:
--------------------------------------
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <winuser.h>
int main()
{
return LockWorkStation();
}
--------------------------------------
on my Win2k box. It works with the MSVC compiler and the command line
$ cl lock.c /link user32.lib
but it fails when compiling with gcc:
$ gcc -luser32 -o lock lock.c
/tmp/ccBhEMhI.o(.text+0xc):lock.c: undefined reference to `LockWorkStation'
collect2: ld returned 1 exit status
Looking through the header file /usr/include/winuser.h shows that
LockWorkStation is never declared, while it is declared in the Microsoft
include files as:
#if(_WIN32_WINNT >= 0x0500)
WINUSERAPI
BOOL
WINAPI
LockWorkStation(
VOID);
#endif /* _WIN32_WINNT >= 0x0500 */
How do I compile this with gcc/Cygwin?
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com