[gdal-dev] direct.h and other Windows issue
landa.martin at gmail.com
Thu Dec 10 01:41:20 PST 2015
2015-12-10 10:27 GMT+01:00 Even Rouault <even.rouault at spatialys.com>:
> And normally ./configure should define HAVE_DIRECT_H in port/cpl_config.h only if
> it is available.
to be more precise, I am building GRASS against GDAL shipped via
OSGeo4W (which has HAVE_DIRECT_H already defined). I didn't find this
header in OSGeo4W framework.
>> OBJ.x86_64-w64-mingw32/main.o: In function `main':
>> /home/landa/grass_trunk/raster/r.external/main.c:154: undefined
>> reference to `_getcwd'
>> relocation truncated to fit: R_X86_64_PC32 against undefined symbol
>> collect2: error: ld returned 1 exit status
> Isn't that a GRASS issue since getcwd() is really called from GRASS code. I'd
> note that GDAL has a CPLGetCurrentDir() function that is essentially a wrapper
> around getcwd(). See port/cpl_path.cpp
getcwd() is used on other places in GRASS, the only failing is
r.external which is linked to GDAL. I found out that GDAL defines:
#define getcwd _getcwd
Could be this the issue?
More information about the gdal-dev