fix/improve hdf5 usage for octave

Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
This commit is contained in:
Thorsten Liebig 2015-05-04 20:02:21 +02:00
parent f3533ed630
commit 846e7c960e
2 changed files with 9 additions and 2 deletions

View File

@ -30,7 +30,7 @@ DEFUN_DLD (h5readatt_octave, args, nargout, "h5readatt_octave(<File_Name>,<DataS
}
//suppress hdf5 error output
H5Eset_auto(NULL, NULL);
H5Eset_auto1(NULL, NULL);
hid_t file = H5Fopen( args(0).string_value().c_str(), H5F_ACC_RDONLY, H5P_DEFAULT );
if (file==-1)

View File

@ -18,7 +18,14 @@ if isOctave()
disp('compiling oct files')
fflush(stdout)
if isunix
mkoctfile -lhdf5 -DH5_USE_16_API h5readatt_octave.cc
[res, fn] = unix('find /usr/lib -name libhdf5.so');
if length(fn)>0
[hdf5lib_dir, hdf5lib_fn] = fileparts(fn);
disp(["HDF5 library path found at: " hdf5lib_dir])
mkoctfile(["-L" hdf5lib_dir ],"-lhdf5 -DH5_USE_16_API", "h5readatt_octave.cc")
else
mkoctfile -lhdf5 -DH5_USE_16_API h5readatt_octave.cc
end
else
mkoctfile -lhdf5 -DH5_USE_16_API h5readatt_octave.cc
end