* w32api.h
@ 2021-12-14 17:45 robhickey
2021-12-14 18:15 ` w32api.h Marco Atzeri
2021-12-14 21:36 ` w32api.h Hans-Bernhard Bröker
0 siblings, 2 replies; 3+ messages in thread
From: robhickey @ 2021-12-14 17:45 UTC (permalink / raw)
To: cygwin
Hi Cygwin,
I'm compiling a non Cygwin code using ./config, make, make install.
The make output says /include/w32api file or directory not found.
I've tried many combinations of absolute and relative paths to prevent the
warning but no luck.
I'm guessing /include is not a standard directory, so I copied the
/usr/include/w32api to /include/w32api/, the warning goes way.
Is this a bad idea?
I also notice that w32api.h defines every version of windows but stops at
windows8.
#define WindowsVista 0x0600
#define Windows7 0x0601
#define Windows8 0x0602
Is it permissible to add
#define windows10 0X0603
Thank you
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: w32api.h
2021-12-14 17:45 w32api.h robhickey
@ 2021-12-14 18:15 ` Marco Atzeri
2021-12-14 21:36 ` w32api.h Hans-Bernhard Bröker
1 sibling, 0 replies; 3+ messages in thread
From: Marco Atzeri @ 2021-12-14 18:15 UTC (permalink / raw)
To: cygwin
On 14.12.2021 18:45, robhickey@gmx.com wrote:
> Hi Cygwin,
>
>
>
> I'm compiling a non Cygwin code using ./config, make, make install.
>
>
>
> The make output says /include/w32api file or directory not found.
probably you can at configure stage set the
prefix of include directory as "/usr"
> I'm guessing /include is not a standard directory, so I copied the
> /usr/include/w32api to /include/w32api/, the warning goes way.
a simple link was also probably enough
mkdir /include
ln -s /usr/include/w32api to /include/w32api
but checking the prefix is better.
> I also notice that w32api.h defines every version of windows but stops at
> windows8.
>
> #define WindowsVista 0x0600
>
> #define Windows7 0x0601
>
> #define Windows8 0x0602
>
>
> Is it permissible to add
>
> #define windows10 0X0603
what is your scope ?
If the original headers are not using that definition
adding it make no difference
By the way
https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170
reports a different value:
----------------------------------------------------------
#define _WIN32_WINNT_WIN7 0x0601 // Windows 7
#define _WIN32_WINNT_WIN8 0x0602 // Windows 8
#define _WIN32_WINNT_WINBLUE 0x0603 // Windows 8.1
#define _WIN32_WINNT_WINTHRESHOLD 0x0A00 // Windows 10
#define _WIN32_WINNT_WIN10 0x0A00 // Windows 10
----------------------------------------------------------
Regards
Marco
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: w32api.h
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
1 sibling, 0 replies; 3+ messages in thread
From: Hans-Bernhard Bröker @ 2021-12-14 21:36 UTC (permalink / raw)
To: cygwin
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-14 21:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 17:45 w32api.h robhickey
2021-12-14 18:15 ` w32api.h Marco Atzeri
2021-12-14 21:36 ` w32api.h Hans-Bernhard Bröker
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).