Tue Dec 14 21:36:04 GMT 2021
Am 14.12.2021 um 18:45 schrieb email@example.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.
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
> 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.
More information about the Cygwin