Vips.guess_libdir
Description: Reference for Vips.guess_libdir

### Function

# Vipsguess_libdir

#### Declaration [src]

    const char*
    vips_guess_libdir (
      const char* argv0,
      const char* env_name
    )

#### Description [src]

`vips_guess_libdir()` tries to guess the install directory (usually the configure libdir, or $prefix/lib). You should pass in the value of argv[0] (the name your program was run as) as a clue to help it out, plus the name of the environment variable you let the user override your package install area with (eg. “VIPSHOME”).

On success, `vips_guess_libdir()` returns the libdir it discovered, and as a side effect, sets the prefix environment variable (if it’s not set).

Don’t free the return string!

See also

`vips_guess_prefix()`.

#### Parameters

`argv0`

  Type: `const char*`

  Program name (typically argv[0]).

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`env_name`

  Type: `const char*`

  Save prefix in this environment variable.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `const char*`

The libdir as a static string, do not free.

The data is owned by the called function.
The value is a NUL terminated UTF-8 string.