delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
Message-ID: | <ABDA876D71F9D211B39D0090274EA8E20140B4D7@Floyd.logica.co.uk> |
From: | "Fieldhouse, Dirk" <Fieldhouse AT logica DOT com> |
To: | "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com> |
Subject: | RE: windres and CONTROL object |
Date: | Fri, 12 Nov 1999 22:21:45 -0000 |
X-Mailer: | Internet Mail Service (5.5.2448.0) |
On 12 Nov 1999 10:25:13 -1000, you wrote: >... > Shouldn't tchar.h define _tcslen independent of whether -mno-cygwin > is used or not? It only makes sense for tchar.h to do this if the run-time library has functions that implement the appropriate strlen clones. tchar is a non-POSIX convenience that works a little differently in the M$ and Unix worlds. > Note, though the program doesn't really use the cygwin API, I don't > care if this API is linked into the binary. > > >GetSystemPowerStatus in winbase.h. > > How do I use this function? The source file already includes > windows.h, > so this is not a problem during compile. But I get an > undefined symbol > when linking. I read the FAQ and it says not to include -lkernel32. > I've also tried to add "@4" to the end of the function call, but I get > a compile error. So what am I doing wrong? According to my understanding (and Microsoft's) the API BOOL GetSystemPowerStatus( LPSYSTEM_POWER_STATUS lpSystemPowerStatus ); is only available as follows: Windows NT/2000: Requires Windows 2000. Windows 95/98: Requires Windows 95 or later. Windows CE: Unsupported. Header: Declared in winbase.h; include windows.h. Library: Use kernel32.lib So you won't want to link this statically anyway (and so this libkernel32.a has helped you by _not_ including the symbol, unlike Microsoft's kernel32.lib). Instead do the LoadLibrary/GetProcAddress thing, check the GetProcAddress return value and do something appropriate if it doesn't find the entry-point: HTH /df -- Dirk Fieldhouse Logica UK Limited fieldhouse AT logica DOT com 75 Hampstead Road c=gb;a=attmail;p=logica; London NW1 2PL o=LOGICA;ou1=UK;s=fieldhouse UK +44 (20) 7637 9111 - not speaking for Logica -- 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 |