Opened 16 years ago
Closed 16 years ago
#2500 closed defect (fixed)
Compilation fails on WIN32 due to recent changes in AVC driver
Reported by: | Even Rouault | Owned by: | Daniel Morissette |
---|---|---|---|
Priority: | high | Milestone: | 1.6.0 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | AVC WIN32 |
Cc: | warmerdam, Mateusz Łoskot |
Description
In http://buildbot.osgeo.org:8500/builders/szekerest-vc80-full/builds/21/steps/nmake/logs/stdio
you can see
avc_e00read.c(115) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directore
This is due to the fact that the #ifdef WIN32 is done before including CPL headers.
#ifdef WIN32 # include <direct.h> /* getcwd() */ #else # include <unistd.h> /* getcwd() */ #endif
WIN32 is defined by cpl_port.h if _WIN32 is defined. So the fix is either to use _WIN32 or include cpl_port.h before
/* ==================================================================== */ /* We will use WIN32 as a standard windows define. */ /* ==================================================================== */ #if defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE) # define WIN32 #endif #if defined(_WINDOWS) && !defined(WIN32) && !defined(_WIN32_WCE) # define WIN32 #endif
Note:
See TracTickets
for help on using tickets.
I'm always confused by the difference between IRC logins and Trac ID...