I have a C++ application using GTKmm version 3.
From one version of the library to another, some method definition change so I would like to handle them in order to allow my sources to compile with a previous and actual version of GTKmm.
When I have written a kernel module, I did the same thing using conditional operators like the following:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
// Something is done when kernel version is 3.6 or higher
#else
// Something else is done for older versions
#endif
So the question is: is this possible in C++ and GTKMM ?
Yes - gtkmm has the defines GTKMM_MAJOR_VERSION
, GTKMM_MINOR_VERSION
, and GTKMM_MICRO_VERSION
.