LockWorkStation()

Jonas Jensen bones0_list@hotmail.com
Sat Aug 26 04:21:00 GMT 2000


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


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /