OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Compiling GDAL with HDF4-support

Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [3rdparty]
View previous topic :: View next topic  
Author Message

Joined: 28 Aug 2012
Posts: 1

PostPosted: Tue Aug 28, 2012 7:25 am    Post subject:
Compiling GDAL with HDF4-support
Reply with quote

I need GDAL with both Shapefile and HDF4-Support, if possible in 64 bit.
Since the normal GDAL-versions from (gisinternalscom) 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. Smile

First Ive downloaded the source code from (tracosgeoorg).
The 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.
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_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" ? Wink
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)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [3rdparty] All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Support for loading cubemap images in... Farshid Lashkari Submission 7 Wed May 09, 2018 5:56 pm View latest post
No new posts Self provide osg related cmake find_p... Ralf Habacker General 0 Thu Apr 26, 2018 7:11 am View latest post
No new posts obj plugin does not support diffuse ... robertosfield Submission 6 Mon Mar 12, 2018 5:17 pm View latest post
No new posts FBX plugin improvement regarding text... a.terenzi Submission 7 Fri Jan 19, 2018 11:39 am View latest post
No new posts support for WildCard sak3t VirtualPlanetBuilder [vpb] 2 Wed Jan 10, 2018 10:28 am View latest post

Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP