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.
This commit is contained in:
V. Armando Solé 2022-12-06 02:19:53 +01:00 committed by GitHub
parent c1c131260a
commit 281984b3e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) */