direct.h
Eric Blake
eblake@redhat.com
Wed Dec 9 19:53:00 GMT 2015
On 12/09/2015 12:39 PM, Martin Landa wrote:
> Hi,
>
> I am trying to build GRASS GIS Windows package as I already described
> [1]. Beside mingr32-w64 toolchain I am trying to compile GRASS also
> using cygwin toolchain. On cygwin toolchain I have problem with
> missing direct.h header which is required by one of GRASS's
> dependencies:
>
> /cygdrive/c/OSGeo4W64/include/cpl_port.h:169:22: fatal error:
> direct.h: No such file or directory
> # include <direct.h>
> ^
That's because <direct.h> is an old, non-standard header not present on
modern POSIX-y machines. You want <dirent.h> instead, when targetting
cygwin. Or else your project is truly tied to Windows, and you should
be targetting mingw, in which case the question is semi-off-topic here
(other than how to properly use the mingw cross-compilers available from
a cygwin installation).
> compilation terminated.
> configure: failed program was:
> #line 6111 "configure"
> #include "confdefs.h"
> #include <gdal.h>
> int main() {
> GDALOpen("foo", GA_ReadOnly);
> ; return 0; }
>
> Is it possible to solve this issue without switching to mingw32-w64
> toolchain (problems described [1])?
That depends on whether your code is POSIX-y and targetting cygwin, or
is tied to Windows APIs and should be targetting mingw.
>
> I am also not sure what will be difference between binaries compiled
> using cygwin and mingw32-w64 toolchain except of dependencies (like
> cygwin1.dll). MinGW32-w64 should produce native windows application,
> but what does it mean exactly?
A native app doesn't depend on cygwin, but that also means it can't use
the POSIX-y interface provided by cygwin.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20151209/6cb238cd/attachment.sig>
More information about the Cygwin
mailing list