-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhello_eejit.cpp
52 lines (41 loc) · 1.36 KB
/
hello_eejit.cpp
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <boost/filesystem.hpp>
#include <gdal_priv.h>
#include <hdf5.h>
#include <cstdlib>
#include <iostream>
#include <string>
int main()
{
// HDF5
{
// Ask HDF5 for its version
unsigned int hdf5_major_version;
unsigned int hdf5_minor_version;
unsigned int hdf5_release_version;
H5get_libversion(&hdf5_major_version, &hdf5_minor_version, &hdf5_release_version);
std::string const hdf5_version{
std::to_string(hdf5_major_version) + "." +
std::to_string(hdf5_minor_version) + "." +
std::to_string(hdf5_release_version)};
std::cout << "HDF5 library " << hdf5_version << " on eejit says Hello World!" << std::endl;
}
// Boost
{
boost::filesystem::path hello{"Hello"};
boost::filesystem::path world{"World"};
std::cout
<< "The Boost filesystem library says " << (hello / world) << " as well!" << std::endl;
}
// GDAL
{
GDALAllRegister();
std::cout << "The folowing raster drivers from the GDAL library say hi:";
GDALDriverManager* driver_manager{GetGDALDriverManager()};
for(int i = 0; i < driver_manager->GetDriverCount(); ++i)
{
std::cout << " " << driver_manager->GetDriver(i)->GetDescription();
}
std::cout << std::endl;
}
return EXIT_SUCCESS;
}