### Method

# GIRepository Repository prepend_library_path

since: 2.80

#### Declaration

    void
    gi_repository_prepend_library_path (
      GIRepository* repository,
      const char* directory
    )

#### Description

Prepends `directory` to the search path that is used to search shared libraries referenced by imported namespaces.

Multiple calls to this function all contribute to the final list of paths.

The list of paths is unique to `repository`. When a typelib is loaded by the repository, the list of paths from the `repository` at that instant is used by the typelib for loading its modules.

If the library is not found in the directories configured in this way, loading will fall back to the system library path (i.e. `LD_LIBRARY_PATH` and `DT_RPATH` in ELF systems). See the documentation of your dynamic linker for full details.

Available since: 2.80

#### Parameters

`directory`

  Type: `const char*`

  A single directory to scan for shared libraries.

  The data is owned by the caller of the method.
  The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.