raylib dependencies - raysan5/raylib GitHub Wiki

The following table lists the raylib dependencies. Most of them are single-file header-only public-domain libraries. All those libraries are included with raylib in src/external directory and they are compiled with raylib.

NOTE: Last updated on 4th February 2023 for the raylib 4.5 release.

Library Version License raylib module Notes/Comments
GLFW3 3.4 zlib/libpng rglfw Window and input management, only on PLATFORM_DESKTOP
glad.h 2.0.0-beta MIT rlgl OpenGL extensions loading, only on PLATFORM_DESKTOP and OpenGL 4.3 Core
glad_gles2.h 2.0.2 MIT rlgl OpenGL extensions loading, only on PLATFORM_DESKTOP and OpenGL ES 2.0
msf_gif 2.2 MIT/public domain rcore GIF recording basic functionality
sdefl.h 1.00 MIT/public domain rcore DEFLATE compression algorithm
sinfl.h 1.00 MIT/public domain rcore DEFLATE decompression algorithm
rprand 1.0 zlib/libpng rcore Pseudo-random numbers generator
stb_image 2.30 MIT/public domain rtextures Multiple image formats loading
stb_image_resize2 2.12 MIT/public domain rtextures Image resizing functions
stb_image_write 1.16 MIT/public domain rtextures Image writing to multiple formats
stb_perlin 0.5 MIT/public domain rtextures Simplex Perlin noise generation
qoi - MIT rtextures QOI image data loading and saving
rl_gputex 1.0 zlib/libpng rtextures Compressed textures data loading
stb_truetype 1.26 MIT/public domain rtext TTF/OTF fonts data loading
stb_rect_pack 1.01 MIT/public domain rtext Rectangles packer, used on font packing
miniaudio 0.11.12 MIT/public domain raudio Audio device management
stb_vorbis 1.22 MIT/public domain raudio OGG audio data loading
dr_wav 0.13.16 MIT/public domain raudio WAV audio data loading
dr_mp3 0.6.39 MIT/public domain raudio MP3 audio data loading
dr_flac 0.12.39 MIT/public domain raudio FLAC audio data loading
jar_mod 0.01 public domain raudio MOD audio module loading, based on HxCModPlayer
jar_xm 0.3.1 public domain raudio XM audio module loading, based on libxm
qoa - MIT raudio QOA audio data loading and saving
par_shapes - MIT rmodels Geometric shapes generation
tinyobj_loader_c - MIT rmodels OBJ/MTL data loading
cgltf 1.14 MIT rmodels glTF models data loading
vox_loader 1.01 MIT rmodels VOX models data loading
m3d 1.0.0 MIT rmodels M3D models data loading
  • NOTE 1: Most of these libraries are only used to load some specific file format (image, font, audio, model).
  • NOTE 2: Some of the dependencies are specific to only one of the platforms that raylib supports or even to some specific compiler (i.e. dirent).
  • NOTE 3: All the libraries licenses should allow raylib to be used on commercial projects without problem.

Platform specific dependency notes

  • PLATFORM_DESKTOP: raylib uses on rcore module the outstanding GLFW3 library, embedded in the form of rglfw. For more details on GLFW usage, check GLFW dependency Wiki page.

  • PLATFORM_ANDROID: raylib uses on rcore module the native_app_glue library (provided by Android NDK). Also, native Android libraries are used to manage window/context, inputs and activity life cycle.

  • PLATFORM_RPI (RPI 0,1,2,3 - native): raylib uses on rcore module the native VideoCore library and EGL for window/context management. Inputs are processed using directly evdev Linux libraries.

  • PLATFORM_DRM (RPI 4 - native): raylib uses on rcore module the native DRM subsystem and GBM API libraries for window/context management. Inputs are processed using evdev Linux libraries.

  • PLATFORM_WEB (HTML5): raylib uses on rcore module the emscripten SDK provided libraries for several input events management, specially noticeable the touch events support.

There are also some platform-specific system libraries that do need to be linked when compiling raylib examples. The following table lists the required system libraries.

PLATFORM platform dependencies Notes
PLATFORM_DESKTOP:Windows OpenGL, GDI32, WinMM, user32, kernel32 Required for window creation. Note that WinMM is only used to get a hi-res timer and it can be avoided commenting SUPPORT_WINMM_HIGHRES_TIMER config flag.
PLATFORM_DESKTOP:Linux OpenGL, X11 Also requires linkage with libm(math), pthreads(POSIX threads), dl(dynamic loading), rt (realtime extensions: nanosleep()) and X11 specific libs: X11, Xrandr, Xinerama, Xi, Xxf86vm and Xcursor
PLATFORM_DESKTOP:FreeBSD OpenGL, X11 Also requires linkage with libm(math), pthreads(POSIX threads), dl(dynamic loading), rt (realtime extensions: nanosleep()) and X11 window system specific libs: X11, Xrandr, Xinerama, Xi, Xxf86vm and Xcursor
PLATFORM_DESKTOP:macOS OpenGL, Cocoa, IOKit, CoreAudio, CoreVideo Required for window creation
PLATFORM_ANDROID EGL, OpenGLES2.0, OpenSLES Code must be compiled using Android NDK libraries. Requires linkage with native_app_glue, log, android, atomic, libc, libm(math) and dl(dynamic loading)
PLATFORM_DRM EGL, OpenGLES2.0, DRM, GBM Graphics run in native mode using DRM (no XWindows required) and inputs are also natively read (no XWindows input events), also requires linkage with libm(math), pthreads(POSIX threads), rt (realtime extensions: nanosleep()) and dl(dynamic loading).
PLATFORM_WEB (HTML5) WebGL Code must be compiled using emscripten SDK, dependencies linkage is automatically detected.

raylib is highly modular by design. Many modules can be omitted when they are not being used, and consequently, the libraries used by those modules will also be redundant.