---
name: "waffle_dl"
section: "3"
platform: "linux"
package: "libwaffle-doc"
version: "1.8.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/waffle_dl"
---

# waffle\_dl(3)

platform-independent interface to dynamic libraries

## NAME

waffle\_dl, waffle\_dl\_can\_open, waffle\_dl\_sym - platform-independent interface to dynamic libraries

## SYNOPSIS

```
#include <waffle.h>
```

**bool waffle\_dl\_can\_open(int32\_t** *dl***);**

**void\* waffle\_dl\_sym(int32\_t** *dl***, const char\*** *symbol***);**

## DESCRIPTION

The waffle\_dl functions provide a platform-independent interface for dynamic OpenGL libraries. For each function, the parameter *dl* must be one of:

**WAFFLE\_DL\_OPENGL**

**WAFFLE\_DL\_OPENGL\_ES1**

**WAFFLE\_DL\_OPENGL\_ES2**

**WAFFLE\_DL\_OPENGL\_ES3**

For example, on Linux, the **WAFFLE\_DL\_\*** enums map to libGL.so.1, libGLESv1\_CM.so.1, libGLESv2.so.2, and libGLESv2.so.2, respectively.

**waffle\_dl\_can\_open()**

Test if a dynamic library can be opened.

**waffle\_dl\_sym()**

Get a *symbol* from a dynamic library.

## RETURN VALUE

Functions whose return type is **bool** return true on success and false on failure. Functions whose return type is a pointer return **NULL** on failure. Use [**waffle\_error\_get\_info**(3)](/waffle_error_get_info/3.md) to get information about any errors.

## ERRORS

If waffle fails to find the requested library on the system, then **WAFFLE\_ERROR\_UNSUPPORTED\_ON\_PLATFORM** is emitted.

See [**waffle\_error**(3)](/waffle_error/3.md) for the complete list of waffle's error codes.

## ISSUES

Please report bugs or and feature requests to **https://gitlab.freedesktop.org/mesa/waffle/issues**.

## SEE ALSO

[**waffle**(7)](/waffle/7.md), [**waffle\_get\_proc\_address**(3)](/waffle_get_proc_address/3.md)

## AUTHOR

**Chad Versace** \<chad.versace@linux.intel.com\>

Former maintainer

## COPYRIGHT

Copyright © 2013 Intel\

This manual page is licensed under the Creative Commons Attribution-ShareAlike 3.0 United States License (CC BY-SA 3.0). To view a copy of this license, visit **http://creativecommons.org.license/by-sa/3.0/us**.
