### Namespace

# GModule – 2.0

Portable API for dynamically loading modules

Version | 2.84.1
Authors | GLib Development Team
License | LGPL-2.1-or-later
Website | https://www.gtk.org
Source | https://gitlab.gnome.org/GNOME/glib/

#### Build

C headers | `gmodule.h`
pkg-config files | `gmodule-2.0`

#### Dependencies

GLib—2.0 | The base utility library
| Browse documentation

#### Additional documentation

- Dynamic Loading of Modules

#### Structs

Module | The `GModule` struct is an opaque data structure to represent a dynamically-loaded module. It should only be accessed via the following functions.

#### Bitfields

ModuleFlags | Flags passed to g_module_open(). Note that these flags are not supported on all platforms.

#### Error Domains

ModuleError | Errors returned by g_module_open_full(). since: 2.70

#### Callbacks

ModuleCheckInit | Specifies the type of the module initialization function. If a module contains a function named `g_module_check_init()` it is called automatically when the module is loaded. It is passed the `GModule` structure and should return `NULL` on success or a string describing the initialization error.
ModuleUnload | Specifies the type of the module function called when it is unloaded. If a module contains a function named `g_module_unload()` it is called automatically when the module is unloaded. It is passed the `GModule` structure.

#### Function Macros

DEPRECATED_ENUMERATOR_IN_2_26_FOR |
DEPRECATED_ENUMERATOR_IN_2_28_FOR |
DEPRECATED_ENUMERATOR_IN_2_30_FOR |
DEPRECATED_ENUMERATOR_IN_2_32_FOR |
DEPRECATED_ENUMERATOR_IN_2_34_FOR |
DEPRECATED_ENUMERATOR_IN_2_36_FOR |
DEPRECATED_ENUMERATOR_IN_2_38_FOR |
DEPRECATED_ENUMERATOR_IN_2_40_FOR |
DEPRECATED_ENUMERATOR_IN_2_42_FOR |
DEPRECATED_ENUMERATOR_IN_2_44_FOR |
DEPRECATED_ENUMERATOR_IN_2_46_FOR |
DEPRECATED_ENUMERATOR_IN_2_48_FOR |
DEPRECATED_ENUMERATOR_IN_2_50_FOR |
DEPRECATED_ENUMERATOR_IN_2_52_FOR |
DEPRECATED_ENUMERATOR_IN_2_54_FOR |
DEPRECATED_ENUMERATOR_IN_2_56_FOR |
DEPRECATED_ENUMERATOR_IN_2_58_FOR |
DEPRECATED_ENUMERATOR_IN_2_60_FOR |
DEPRECATED_ENUMERATOR_IN_2_62_FOR |
DEPRECATED_ENUMERATOR_IN_2_64_FOR |
DEPRECATED_ENUMERATOR_IN_2_66_FOR |
DEPRECATED_ENUMERATOR_IN_2_68_FOR |
DEPRECATED_ENUMERATOR_IN_2_70_FOR |
DEPRECATED_ENUMERATOR_IN_2_72_FOR |
DEPRECATED_ENUMERATOR_IN_2_74_FOR |
DEPRECATED_ENUMERATOR_IN_2_76_FOR |
DEPRECATED_ENUMERATOR_IN_2_78_FOR |
DEPRECATED_ENUMERATOR_IN_2_80_FOR |
DEPRECATED_ENUMERATOR_IN_2_82_FOR |
DEPRECATED_ENUMERATOR_IN_2_84_FOR |
DEPRECATED_FOR |
DEPRECATED_IN_2_26_FOR |
DEPRECATED_IN_2_28_FOR |
DEPRECATED_IN_2_30_FOR |
DEPRECATED_IN_2_32_FOR |
DEPRECATED_IN_2_34_FOR |
DEPRECATED_IN_2_36_FOR |
DEPRECATED_IN_2_38_FOR |
DEPRECATED_IN_2_40_FOR |
DEPRECATED_IN_2_42_FOR |
DEPRECATED_IN_2_44_FOR |
DEPRECATED_IN_2_46_FOR |
DEPRECATED_IN_2_48_FOR |
DEPRECATED_IN_2_50_FOR |
DEPRECATED_IN_2_52_FOR |
DEPRECATED_IN_2_54_FOR |
DEPRECATED_IN_2_56_FOR |
DEPRECATED_IN_2_58_FOR |
DEPRECATED_IN_2_60_FOR |
DEPRECATED_IN_2_62_FOR |
DEPRECATED_IN_2_64_FOR |
DEPRECATED_IN_2_66_FOR |
DEPRECATED_IN_2_68_FOR |
DEPRECATED_IN_2_70_FOR |
DEPRECATED_IN_2_72_FOR |
DEPRECATED_IN_2_74_FOR |
DEPRECATED_IN_2_76_FOR |
DEPRECATED_IN_2_78_FOR |
DEPRECATED_IN_2_80_FOR |
DEPRECATED_IN_2_82_FOR |
DEPRECATED_IN_2_84_FOR |
DEPRECATED_MACRO_IN_2_26_FOR |
DEPRECATED_MACRO_IN_2_28_FOR |
DEPRECATED_MACRO_IN_2_30_FOR |
DEPRECATED_MACRO_IN_2_32_FOR |
DEPRECATED_MACRO_IN_2_34_FOR |
DEPRECATED_MACRO_IN_2_36_FOR |
DEPRECATED_MACRO_IN_2_38_FOR |
DEPRECATED_MACRO_IN_2_40_FOR |
DEPRECATED_MACRO_IN_2_42_FOR |
DEPRECATED_MACRO_IN_2_44_FOR |
DEPRECATED_MACRO_IN_2_46_FOR |
DEPRECATED_MACRO_IN_2_48_FOR |
DEPRECATED_MACRO_IN_2_50_FOR |
DEPRECATED_MACRO_IN_2_52_FOR |
DEPRECATED_MACRO_IN_2_54_FOR |
DEPRECATED_MACRO_IN_2_56_FOR |
DEPRECATED_MACRO_IN_2_58_FOR |
DEPRECATED_MACRO_IN_2_60_FOR |
DEPRECATED_MACRO_IN_2_62_FOR |
DEPRECATED_MACRO_IN_2_64_FOR |
DEPRECATED_MACRO_IN_2_66_FOR |
DEPRECATED_MACRO_IN_2_68_FOR |
DEPRECATED_MACRO_IN_2_70_FOR |
DEPRECATED_MACRO_IN_2_72_FOR |
DEPRECATED_MACRO_IN_2_74_FOR |
DEPRECATED_MACRO_IN_2_76_FOR |
DEPRECATED_MACRO_IN_2_78_FOR |
DEPRECATED_MACRO_IN_2_80_FOR |
DEPRECATED_MACRO_IN_2_82_FOR |
DEPRECATED_MACRO_IN_2_84_FOR |
DEPRECATED_TYPE_IN_2_26_FOR |
DEPRECATED_TYPE_IN_2_28_FOR |
DEPRECATED_TYPE_IN_2_30_FOR |
DEPRECATED_TYPE_IN_2_32_FOR |
DEPRECATED_TYPE_IN_2_34_FOR |
DEPRECATED_TYPE_IN_2_36_FOR |
DEPRECATED_TYPE_IN_2_38_FOR |
DEPRECATED_TYPE_IN_2_40_FOR |
DEPRECATED_TYPE_IN_2_42_FOR |
DEPRECATED_TYPE_IN_2_44_FOR |
DEPRECATED_TYPE_IN_2_46_FOR |
DEPRECATED_TYPE_IN_2_48_FOR |
DEPRECATED_TYPE_IN_2_50_FOR |
DEPRECATED_TYPE_IN_2_52_FOR |
DEPRECATED_TYPE_IN_2_54_FOR |
DEPRECATED_TYPE_IN_2_56_FOR |
DEPRECATED_TYPE_IN_2_58_FOR |
DEPRECATED_TYPE_IN_2_60_FOR |
DEPRECATED_TYPE_IN_2_62_FOR |
DEPRECATED_TYPE_IN_2_64_FOR |
DEPRECATED_TYPE_IN_2_66_FOR |
DEPRECATED_TYPE_IN_2_68_FOR |
DEPRECATED_TYPE_IN_2_70_FOR |
DEPRECATED_TYPE_IN_2_72_FOR |
DEPRECATED_TYPE_IN_2_74_FOR |
DEPRECATED_TYPE_IN_2_76_FOR |
DEPRECATED_TYPE_IN_2_78_FOR |
DEPRECATED_TYPE_IN_2_80_FOR |
DEPRECATED_TYPE_IN_2_82_FOR |
DEPRECATED_TYPE_IN_2_84_FOR |
UNAVAILABLE |
UNAVAILABLE_STATIC_INLINE |

#### Constants

MODULE_IMPL_AR |
MODULE_IMPL_DL |
MODULE_IMPL_NONE |
MODULE_IMPL_WIN32 |