fix/improve hdf5 usage for octave
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
This commit is contained in:
parent
f3533ed630
commit
846e7c960e
@ -30,7 +30,7 @@ DEFUN_DLD (h5readatt_octave, args, nargout, "h5readatt_octave(<File_Name>,<DataS
|
|||||||
}
|
}
|
||||||
|
|
||||||
//suppress hdf5 error output
|
//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 );
|
hid_t file = H5Fopen( args(0).string_value().c_str(), H5F_ACC_RDONLY, H5P_DEFAULT );
|
||||||
if (file==-1)
|
if (file==-1)
|
||||||
|
@ -18,7 +18,14 @@ if isOctave()
|
|||||||
disp('compiling oct files')
|
disp('compiling oct files')
|
||||||
fflush(stdout)
|
fflush(stdout)
|
||||||
if isunix
|
if isunix
|
||||||
|
[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
|
mkoctfile -lhdf5 -DH5_USE_16_API h5readatt_octave.cc
|
||||||
|
end
|
||||||
else
|
else
|
||||||
mkoctfile -lhdf5 -DH5_USE_16_API h5readatt_octave.cc
|
mkoctfile -lhdf5 -DH5_USE_16_API h5readatt_octave.cc
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user