[gdal-dev] Compile GDAL with HDF4 and Shapefile-Support (64bit)
David1980
dleimbach at zebris.com
Tue Aug 28 03:24:00 PDT 2012
I need GDAL with both Shapefile and HDF4-Support, if possible in 64 bit.
Since the normal GDAL-versions from http://www.gisinternals.com/sdk/ have
Shapefile, but no HDF4 and the version from FWTools
has HDF4, but no Shapefiles, Im afraid I have to compile a GDAL-version by
myself.
The problem is that Im 'just' a geographer with programming skills, but no
real IT-expert, and Ive never compiled open source by myself,
so maybe my question is quite simple for you. :)
First Ive downloaded the source code from
http://trac.osgeo.org/gdal/wiki/DownloadSource.
Then I opened makegdal90.vcproj with Visual Studio 2010. It needed to do
some updates, then it opened.
If I compile it without changes, I get a GDAL-folder with a new GDAL19.dll.
If I try to use this whole folder in my C#-project that works with normal
GDAL-versions, I get a error.
But if I only copy the new GDAL19.dll over the old one in the existing
GDAL(32 bit)-folder it works.
Is this how it should be or is something going wrong here already ?
The second step is to switch to 64bit, in nmake.opt I changed the following
entry:
# Uncomment the following if you are building for 64-bit windows
# (x64). You'll need to have PATH, INCLUDE and LIB set up for 64-bit
# compiles.
WIN64=YES
Then I changed the setting of the VS-project to X64 and compiled again.
It still works as before: I get a new GDAL19.dll that works fine in my old
GDAL(64 bit)-folder.
But then I cant do the third step, including HDF4. I found and changed the
following section in nmake.opt:
# Uncomment the following and update to enable NCSA HDF Release 4 support.
HDF4_PLUGIN = NO
HDF4_DIR = C:\HDF
HDF4_LIB = /LIBPATH:$(HDF4_DIR)\lib Ws2_32.lib
I tried it maybe 100 times, but it never worked. Sometimes I get a corrupt
GDAL19.dll, sometimes I get >100 errors when compiling
and sometimes I get a working GDAL19.dll without HDF4-support. I've read
almost every Google-hit in English and German I found,
but it never worked. One problem is that the files mentioned there do not
exist in the HDF-versions Ive downloaded. I guess, this
tips were for much older versions of GDAL and HDF4.
So can anybody give a step by step tutorial "How to compile GDAL with HDF4
for dummies" ? ;)
I need to know which HDF4-files I need, where to get them, and what exactly
I have to write in nmake.opt.
Or is there a ready to use GDAL-download with HDF4 and Shapefiles somewhere
?
(32 bit would be OK to, that isnt that important)
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Compile-GDAL-with-HDF4-and-Shapefile-Support-64bit-tp4998275.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the gdal-dev
mailing list