public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Hans-Bernhard Bröker" <HBBroeker@t-online.de>
To: cygwin@cygwin.com
Subject: Re: w32api.h
Date: Tue, 14 Dec 2021 22:36:04 +0100	[thread overview]
Message-ID: <45c35ca2-5f36-3642-87c5-e57a112cd4b2@t-online.de> (raw)
In-Reply-To: <023001d7f112$6bfb0fc0$43f12f40$@gmx.com>

Am 14.12.2021 um 18:45 schrieb robhickey@gmx.com:
> Hi Cygwin,
> 
> 
> 
> I'm compiling a non Cygwin code using  ./config, make, make install.

How exactly are you using "./config"?  Is it a normal GNU autoconf 
./configure script?  If so, you should probably have made that point to 
the mingw cross-compilers distributed with cygwin, e.g.

	./configure --host=i686-w64-mingw32

Other configuration script generators (hopefully) have similar wayss of 
pointing them at a compiler target other than the native one.  For a 
non-Cygwin project expecting Windows API headers, a MingW cross 
compilation like the above is a whole lot more likely to just work than 
a mash-up Cygwin-with-Windows-headers-on-top one.

> The make output  says  /include/w32api  file or directory not found.

Make output is most likely just a symptom here.  The problem happened 
during configuration.  It probably tried to locate those files in 
$(some_prefix)/include/w32api, but didn't find any prefix that applied. 
  So now $(some_prefix) evaluates to an empty string.

> I also notice that w32api.h defines every version of windows but stops at
> windows8.
[...]
> Is it permissible to add

> #define windows10  0X0603

Well, there's no law forbidding it ;-)

But it's fragile (may be overwritten by any update of the package it 
came from), and would be somewhat beside the point.  Those definitions, 
like it says in the comment right above them, are just a gimmick for the 
user to make selecting a target version slightly easier.  You can just 
as easily set your WINVER to 0x0603 directly, instead of relying on your 
locally patched version of a standard header file, where that local 
change will probably be updated away the very week you completely forget 
about that tweak you made, many moons ago.  And it wouldn't work for 
anyone else you passed your sources to, either, because they would be 
lacking that local modification.

      parent reply	other threads:[~2021-12-14 21:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14 17:45 w32api.h robhickey
2021-12-14 18:15 ` w32api.h Marco Atzeri
2021-12-14 21:36 ` Hans-Bernhard Bröker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45c35ca2-5f36-3642-87c5-e57a112cd4b2@t-online.de \
    --to=hbbroeker@t-online.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).