[Gdal-dev] Help with building GDAL with HDF5 support
Frank Warmerdam
warmerdam at pobox.com
Mon May 7 11:59:10 EDT 2007
Filip Rooms wrote:
> configure --prefix=/home/frooms/gdal-test --with-hdf5=/usr/lib
>
> I get
> checking for H5Fopen in -lhdf5... no (yet with nm on libhdf5, it
> responds with 0000549d T H5Fopen, so the symbol is defined)
>
> ...
>
> HDF5 support: yes
>
> When I checked the dependencies of gdal after compilation with ldd,
> there was no mentioning of libhdf5, and linking ogrinfo failed
> (undefined references to the HDF5 stuff).
>
> What did I do wrong, and how can I build my GDAL then with HDF5 support?
Filip,
I believe you should be using --with-hdf5=/usr or perhaps even just
--with-hdf5. If you use /usr/lib it will look for include files in
/usr/lib/include and libraries in /usr/lib/lib.
It may also be instructive to see what gets inserted in the GDALmake.opt
file at this point:
#
# HDF5 Support.
#
HAVE_HDF5 = no
HDF5_INCLUDE =
For HDF5 support to work, HAVE_HDF5 needs to be yes, HDF5_INCLUDE needs
to include the appropriate -I directive, and LIBS needs to include the
appropriate library definitions (eg. -L/usr/lib -lhdf5 I imagine).
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the Gdal-dev
mailing list