Version Information: Exo Reference Manual

## Version Information Version Information — Variables and macros to check the exo version |

## Functions

const gchar * | exo_check_version ()
#define | EXO_CHECK_VERSION()

## Types and Values

extern const guint | exo_major_version
extern const guint | exo_minor_version
extern const guint | exo_micro_version
#define | EXO_MAJOR_VERSION
#define | EXO_MINOR_VERSION
#define | EXO_MICRO_VERSION

## Includes

    #include <exo/exo.h>

## Description

Exo provides version information, primarily useful in configure for builds that have a configure script. Applications may use it to check if a certain feature is available in the version of libexo they are being built against or being linked with.

## Functions

### exo_check_version ()

    const gchar *
    exo_check_version (guint required_major,
                       guint required_minor,
                       guint required_micro);

Checks that the `exo` library in use is compatible with the given version. Generally you would pass in the constants EXO_MAJOR_VERSION, EXO_MINOR_VERSION and EXO_MICRO_VERSION as the three arguments to this function; that produces a check that the library in use is compatible with the version of

`exo` the application was

compiled against.

Example 2. Checking the runtime version of the exo library

    1
    2
    3
    4
    5
    6
    const gchar *mismatch;
    mismatch = exo_check_version (EXO_VERSION_MAJOR,
                                  EXO_VERSION_MINOR,
                                  EXO_VERSION_MICRO);
    if (G_UNLIKELY (mismatch != NULL))
      g_error ("Version mismatch: %s", mismatch);

#### Parameters

required_major | the required major version. |
required_minor | the required minor version. |
required_micro | the required micro version. |

#### Returns

`NULL` if the library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by the library and must not be freed or modified by the caller.

Since: 0.3.1

### EXO_CHECK_VERSION()

    #define             EXO_CHECK_VERSION(major, minor, micro)

Checks the exo version.

#### Parameters

major | major version (e.g. 1 for version 1.2.3) |
minor | minor version (e.g. 2 for version 1.2.3) |
micro | micro version (e.g. 3 for version 1.2.3) |

#### Returns

`TRUE` if the version of the exo header files is equal or better than the passed-in version.

## Types and Values

### exo_major_version

    extern const guint exo_major_version;

The major version number of the exo library (e.g. in exo 1.2.3 this is 1).

This variable is in the library, and therefore represents the exo library you have linked against. Contrast with the EXO_MAJOR_VERSION macro, which represents the major version of the libexo headers you have included.

### exo_minor_version

    extern const guint exo_minor_version;

The minor version number of the exo library (e.g. in exo 1.2.3 this is 2).

This variable is in the library, and therefore represents the exo library you have linked against. Contrast with the EXO_MINOR_VERSION macro, which represents the minor version of the libexo headers you have included.

### exo_micro_version

    extern const guint exo_micro_version;

The micro version number of the exo library (e.g. in exo 1.2.3 this is 3).

This variable is in the library, and therefore represents the exo library you have linked against. Contrast with the EXO_MICRO_VERSION macro, which represents the micro version of the libexo headers you have included.

### EXO_MAJOR_VERSION

    #define             EXO_MAJOR_VERSION

Like exo_major_version, but from the headers used at application compile time, rather than from the library linked against at application run time.

### EXO_MINOR_VERSION

    #define             EXO_MINOR_VERSION

Like exo_minor_version, but from the headers used at application compile time, rather than from the library linked against at application run time.

### EXO_MICRO_VERSION

    #define             EXO_MICRO_VERSION

Like exo_micro_version, but from the headers used at application compile time, rather than from the library linked against at application run time.