H5G_CREATE is a macro that is mapped to either H5G_CREATE1 or H5G_CREATE2, depending on the HDF5 library configuration and application compile-time compatibility macro mapping options.
This macro is provided to facilitate application compatibility. For example:
- The H5G_CREATE macro will be mapped to H5G_CREATE1 and will use the H5G_CREATE1 syntax (first signature above) if the application is coded for HDF5 Release 1.6.x.
- The H5G_CREATE macro will be mapped to H5G_CREATE2 and will use the H5G_CREATE2 syntax (second signature above) if the application is coded for HDF5 Release 1.8.x.
Macro use and compatibility macro mapping options are fully described in API Compatibility Macros in HDF5.
When both the HDF5 library and the application are built without specific compatibility macro mapping options, the default behavior occurs and H5G_CREATE is mapped to the most recent version of the function, currently H5G_CREATE2. If the library and/or application is compiled for Release 1.6 emulation, H5G_CREATE will be mapped to H5G_CREATE1.
Function mapping flags can be used to override these settings on a function-by-function basis when the application is compiled. The H5G_CREATE function mapping flags are shown:
|macro maps to|
A group created with this macro should be closed with H5G_CLOSE when the group is no longer needed so that resource leaks will not develop.
Interface history: Signature  above is the original H5G_CREATE interface and the only interface available prior to HDF5 Release 1.8.0. This signature and the corresponding function are now deprecated but will remain directly callable as H5G_CREATE1.
Signature  above was introduced with HDF5 Release 1.8.0 and is the recommended and default interface. It is directly callable as H5G_CREATE2.
Deprecated functions may not be available in all installations of the HDF5 library. See API Compatibility Macros in HDF5 for details.