summaryrefslogtreecommitdiffstats
path: root/test cases/frameworks/25 hdf5/main.cpp
blob: 477e76b6663a40149226ba42ad6496f9d6d909fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>
#include "hdf5.h"


int main(void)
{
herr_t ier;
unsigned maj, min, rel;

ier = H5open();
if (ier) {
    std::cerr << "Unable to initialize HDF5: " << ier << std::endl;
    return EXIT_FAILURE;
}

ier = H5get_libversion(&maj, &min, &rel);
if (ier) {
    std::cerr << "HDF5 did not initialize!" << std::endl;
    return EXIT_FAILURE;
}
std::cout << "C++ HDF5 version " << maj << "." << min << "." << rel << std::endl;

ier = H5close();
if (ier) {
    std::cerr << "Unable to close HDF5: " << ier << std::endl;
    return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}