# Version API

Source: https://sh4zam.com/api/version/

> Compile-time and link-time version checking of the SH4ZAM library

This file provides the utility macros and constants needed for implementing compile/link-time version checking of the SH4ZAM library. `SHZ_VERSION_INIT()` packs major, minor and patch fields into a single unsigned 32-bit value that can be compared for equality or inequality. `shz_version_linked()` returns the version of the library you actually linked against, so it can be checked against the headers you compiled with.

- **C header:** `#include <sh4zam/shz_version.h>`
- **C++ header:** `#include <sh4zam/shz_version.hpp>`
- **C++ types:** [`shz::version`](https://sh4zam.com/api/cpp/version/)
- **Symbols:** 9

## Compile-Time Utilities

Constants and methods for checking the compile-time SH4ZAM version.

| Symbol | Description |
| --- | --- |
| [`SHZ_VERSION_MAJOR`](https://sh4zam.com/api/version/SHZ_VERSION_MAJOR/) | Compile-time SH4ZAM major version. |
| [`SHZ_VERSION_MINOR`](https://sh4zam.com/api/version/SHZ_VERSION_MINOR/) | Compile-time SH4ZAM minor version. |
| [`SHZ_VERSION_PATCH`](https://sh4zam.com/api/version/SHZ_VERSION_PATCH/) | Compile-time Sh4ZAM patch version. |
| [`SHZ_VERSION`](https://sh4zam.com/api/version/SHZ_VERSION/) | Current SH4ZAM full compile-time version identifier, integer-compatible. |
| [`SHZ_VERSION_INIT`](https://sh4zam.com/api/version/SHZ_VERSION_INIT/) | Packs values of individual version components into a SH4ZAM full version value. |

## Link-Time Utilities

Methods for checking the link-time SH4ZAM version.

| Symbol | Description |
| --- | --- |
| [`shz_version_t`](https://sh4zam.com/api/version/shz_version_t/) | Integer-compatible value type containing a full SH4ZAM version. |
| [`shz_version`](https://sh4zam.com/api/version/shz_version-typedef/) | Version typedef for those who hate POSIX-style. |
| [`shz_version_linked`](https://sh4zam.com/api/version/shz_version_linked/) | Returns the full version of SH4ZAM that was linked against. |
| [`shz_version_fields`](https://sh4zam.com/api/version/shz_version_fields/) | Extracts the individual version component values from a full version. |
