diff options
author | V. Armando Solé <vasole@users.noreply.github.com> | 2022-12-06 01:19:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-06 01:19:53 (GMT) |
commit | 281984b3e3c0ca7ad92055852534577da34777e8 (patch) | |
tree | 2d78299326952be9b834240031d12f6dc2f6662c /src | |
parent | c1c131260a0e48f9eb629765dc3d11d53eff0980 (diff) | |
download | hdf5-281984b3e3c0ca7ad92055852534577da34777e8.zip hdf5-281984b3e3c0ca7ad92055852534577da34777e8.tar.gz hdf5-281984b3e3c0ca7ad92055852534577da34777e8.tar.bz2 |
H5E_ERR_CLS_g symbol missing when compiling C++ plugins (#2269)
C++ HDF5 filter plugin SZ3 fails to build under windows with failure at linking time unless that extern "C" block is added.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Epublic.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/H5Epublic.h b/src/H5Epublic.h index 5f4e325..c01fa2b 100644 --- a/src/H5Epublic.h +++ b/src/H5Epublic.h @@ -59,8 +59,15 @@ typedef struct H5E_error2_t { #endif /* H5private_H */ /* HDF5 error class */ +/* Extern "C" block needed to compile C++ filter plugins with some compilers */ +#ifdef __cplusplus +extern "C" { +#endif #define H5E_ERR_CLS (H5OPEN H5E_ERR_CLS_g) H5_DLLVAR hid_t H5E_ERR_CLS_g; +#ifdef __cplusplus +} +#endif /* Include the automatically generated public header information */ /* (This includes the list of major and minor error codes for the library) */ |