delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
X-Originating-IP: | [213.237.1.186] |
From: | "Jonas Jensen" <bones0_list AT hotmail DOT com> |
To: | "Cygwin List" <cygwin AT sources DOT redhat DOT com> |
Subject: | LockWorkStation() |
Date: | Sat, 26 Aug 2000 13:16:42 +0200 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook Express 5.50.4133.2400 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
Message-ID: | <OE21ACkWHZqYW8BYXif00000124@hotmail.com> |
X-OriginalArrivalTime: | 26 Aug 2000 11:21:29.0201 (UTC) FILETIME=[C79AAE10:01C00F4F] |
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 AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |