Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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" To: "Cygwin List" Subject: LockWorkStation() Date: Sat, 26 Aug 2000 13:16:42 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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: 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 #include 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