SDL_dlopennote.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros

#define | SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED "suggested"
#define | SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED "recommended"
#define | SDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED "required"
#define | SDL_DISABLE_DLOPEN_NOTES
#define | SDL_ELF_NOTE_DLOPEN(...)

## Macro Definition Documentation

## SDL_DISABLE_DLOPEN_NOTES

#define SDL_DISABLE_DLOPEN_NOTES

Definition at line 107 of file SDL_dlopennote.h.

## SDL_ELF_NOTE_DLOPEN

#define SDL_ELF_NOTE_DLOPEN | ( |  | ... | ) |

Definition at line 230 of file SDL_dlopennote.h.

## SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED

#define SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED "recommended"

Use this macro with SDL_ELF_NOTE_DLOPEN() to note that a dynamic shared library dependency is recommended.

Important functionality needs the dependency, the binary will work but in most cases the dependency should be provided.

Since
  This macro is available since SDL 3.4.0.

See also
  SDL_ELF_NOTE_DLOPEN
  SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED
  SDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED

Definition at line 86 of file SDL_dlopennote.h.

## SDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED

#define SDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED "required"

Use this macro with SDL_ELF_NOTE_DLOPEN() to note that a dynamic shared library dependency is required.

Core functionality needs the dependency, the binary will not work if it cannot be found.

Since
  This macro is available since SDL 3.4.0.

See also
  SDL_ELF_NOTE_DLOPEN
  SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED
  SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED

Definition at line 101 of file SDL_dlopennote.h.

## SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED

#define SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED "suggested"

# CategoryDlopenNotes

This header allows you to annotate your code so external tools know about dynamic shared library dependencies.

If you determine that your toolchain doesn't support dlopen notes, you can disable this feature by defining SDL_DISABLE_DLOPEN_NOTES. You can use this CMake snippet to check for support:

include(CheckCSourceCompiles)
find_package(SDL3 REQUIRED CONFIG COMPONENTS Headers)
list(APPEND CMAKE_REQUIRED_LIBRARIES SDL3::Headers)
check_c_source_compiles([==[
#include <SDL3/SDL_dlopennote.h>
SDL_ELF_NOTE_DLOPEN("sdl-video",
"Support for video through SDL",
SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
"libSDL-1.2.so.0", "libSDL-2.0.so.0", "libSDL3.so.0"
)
int main(int argc, char *argv[]) {
return argc + argv[0][1];
}
]==] COMPILER_SUPPORTS_SDL_ELF_NOTE_DLOPEN)
if(NOT COMPILER_SUPPORTS_SDL_ELF_NOTE_DLOPEN)
add_compile_definitions(-DSDL_DISABLE_DLOPEN_NOTE)
endif()

Use this macro with SDL_ELF_NOTE_DLOPEN() to note that a dynamic shared library dependency is optional.

Optional functionality uses the dependency, the binary will work and the dependency is only needed for full-featured installations.

Since
  This macro is available since SDL 3.4.0.

See also
  SDL_ELF_NOTE_DLOPEN
  SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED
  SDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED

Definition at line 71 of file SDL_dlopennote.h.