delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/12/14/16:37:41

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AC766385840B
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=t-online.de
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=t-online.de
Message-ID: <45c35ca2-5f36-3642-87c5-e57a112cd4b2@t-online.de>
Date: Tue, 14 Dec 2021 22:36:04 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.3.2
Subject: Re: w32api.h
To: cygwin AT cygwin DOT com
References: <023001d7f112$6bfb0fc0$43f12f40$@gmx.com>
From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= <HBBroeker AT t-online DOT de>
In-Reply-To: <023001d7f112$6bfb0fc0$43f12f40$@gmx.com>
X-TOI-EXPURGATEID: 150726::1639517764-00001468-BB71FABC/0/0 CLEAN NORMAL
X-TOI-MSGID: dd2e1d40-63ce-43ef-a8b2-158eb5c52d6f
X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_FROM,
FREEMAIL_REPLY, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE,
TXREP autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

Am 14.12.2021 um 18:45 schrieb robhickey AT gmx DOT 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.

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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