dlerror(3)

dlerror3

Obtain error diagnostic for functions in the dlopen api

Usage

#include <dlfcn.h>

char *dlerror(void);

Library

Dynamic linking library (libdl, -ldl)

Overview

The dlerror() function returns a human-readable, null-terminated string describing the most recent error that occurred from a call to one of the functions in the dlopen API since the last call to dlerror(). The returned string does not include a trailing newline.

dlerror() returns NULL if no errors have occurred since initialization or since it was last called.

Attributes

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue
dlerror()Thread safetyMT-Safe

Notes

The message returned by dlerror() may reside in a statically allocated buffer that is overwritten by subsequent dlerror() calls.

Examples

See dlopen(3).

Releases

19 releases since Debian 1.1 (Buzz); the text changed 17 times.

  1. 1.1
  2. 1.2
  3. 1.3–2.0
  4. 2.1
  5. 2.2
  6. 3.0
  7. 3.1
  8. 4.0
  9. 5.0
  10. 6.0
  11. 7
  12. 8
  13. 9
  14. 10
  15. 11
  16. 12
  17. 13
  18. Arch

Standards

POSIX.1-2008.

History

glibc 2.0. POSIX.1-2001.

SunOS.

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.