                               HDF4 Examples

Code Examples
=============
This directory contains example programs for the installed APIs and scripts to 
compile and run them.  Examples in the c subdirectory are always 
installed, and those in the fortan subdirectory will be installed 
when fortran is enabled.

Running the run-all-ex.sh script in this directory will run the scripts and in 
turn the examples in the subdirectories where examples are installed.  The 
scripts can also be run individually.  The appropriate compile scripts in the 
bin directory for this install will be used by default to compile and link the 
example programs.  Note that h4redeploy must be run if these binaries are 
copied or extracted in a directory other than the one where they were initially 
installed.  Compile scripts from other locations can be used by setting an 
environment variable prefix to the path of the directory containing the bin 
directory with the compile scripts h4cc and h4fc.  For example, export 
prefix=/usr/local/hdf4 to use h4cc and h4fc in /usr/local/hdf4/bin.

Running HDF4 examples built with shared libraries not in system locations may 
result in an error message "...error while loading shared libraries: ...".  
Setting LD_LIBRARY_PATH to include the directory containing the missing library
should allow the examples to run.


HDF4 Data File Examples
=======================
Examples of HDF4 data files (with extension .hdf) may be found in the source directory mfhdf/dumper/testfiles.  Also, running the run-all-ex.sh script produces HDF4 data files that are automatically deleted by the scripts.  The scripts in the c and fortran subdirectories can be modified to not delete those data files by commenting with "#" the line "rm *.hdf" in the last 5 lines of the scripts in those subdirectories.   
