GIMP-Print - Version functions

Go to the first, previous, next, last section, table of contents.

## 4.8 Version functions

Function: const char * stp_check_version (unsigned int required_major,
  unsigned int required_minor, unsigned int required_micro)

  This function checks whether the version of libgimpprint that the program is linked with is equal to the version number passed to it. If the version is the same, the function returns `NULL`. If any of the version numbers do not match (i.e. the library version is too old or too new), a string containing a desription of the difference is returned. The first error found is returned. The function checks in the order major, minor, micro.

### 4.8.1 Version macros

Macro: GIMPPRINT_CHECK_VERSION (major,minor,micro)

  This macro returns zero if the version of the libgimpprint headers are greater or equal to the version given as an argument. It returns nonzero if the version of the libgimpprint headers are less than the argument.

Macro: GIMPPRINT_MAJOR_VERSION

Macro: GIMPPRINT_MINOR_VERSION

Macro: GIMPPRINT_MICRO_VERSION

Macro: GIMPPRINT_CURRENT_INTERFACE

Macro: GIMPPRINT_BINARY_AGE

Macro: GIMPPRINT_INTERFACE_AGE

These macros are integers holding the version numbers. They should be used for compile-time checking only. To check version numbers at run-time, use the equivalent variables. Note that at present (4.1.x development branch) the library interface version numbers are not used.

### 4.8.2 Version variables

Variable: const unsigned int gimpprint_major_version

Variable: const unsigned int gimpprint_minor_version

Variable: const unsigned int gimpprint_micro_version

Variable: const unsigned int gimpprint_current_interface

Variable: const unsigned int gimpprint_binary_age

Variable: const unsigned int gimpprint_interface_age

These variables hold the library version numbers. Because the version of the library may change on a system using shared libraries, these should be used instead of the equivalent macros when checking the library version at run-time. Note that library interface version numbers are not used in the development branch, but are in the stable branch.

Go to the first, previous, next, last section, table of contents.