delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/11/13/14:50:52

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: <199911131949.NAA01246@mercury.xraylith.wisc.edu>
To: jimen AT adtech-inc DOT com
cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: windres and CONTROL object
In-Reply-To: Your message of "Fri, 12 Nov 1999 10:25:13 -1000."
<000a01bf2d4c$06cbd7d0$5265000a AT jching DOT alii DOT com>
Date: Sat, 13 Nov 1999 13:49:02 -0600
From: Mumit Khan <khan AT thor DOT xraylith DOT wisc DOT edu>

"Jimen Ching" <jimen AT adtech-inc DOT com> writes:
> >_sntprintf and _tcslen are in tchar.h (not the underscore!) and 
> 
> You're right, I should have did a grep first, sorry.  I didn't know
> _tcslen was a macro.  Anyway, I now did a grep (on 20.1).  The macro
> is only defined in mingw32/tchar.h.  There is a file named tchar.h
> in the same directory as windows.h, but this header does not define
> _tcslen.
> 
> I tried using -mno-cygwin, but that causes other errors in stdlib.h.
> Shouldn't tchar.h define _tcslen independent of whether -mno-cygwin
> is used or not?

This is partly my fault. The Mingw runtime headers in Cygwin is quite
out of date, and I just haven't had the time to send the changes to
Cygwin folks. Cygwin team of course has to deal with their priority
first -- Cygwin, not "no Cygwin".

Download the mingw runtime from my site and use those instead (the
mingw-extra package doesn't supply these -- yet).

 ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/runtime/

unzip to a temporary directory, and move the includes and libraries
to a /usr/local/mingw/include and /usr/local/mingw/lib directory and
use -I<dir> and -L<dir> to help gcc -mno-cygwin along.

You want the latest bin-crtdll .zip file (currently at 1999-11-07).

> 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?

The b20.1 win32 headers are simply too incomplete, and it doesn't have
the prototype for GetSystemPowerStatus. Download the mingw runtime, and
that should help.

I'll enhance the mingw-extra package later on to include the whole bit
to avoid these problems.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019