Skip to content

raylib dependencies

Ray edited this page Apr 19, 2021 · 37 revisions

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 14th April 2021 for the raylib 3.7 release.

Library Version raylib module Notes
GLFW3 3.4-master rglfw Window and input management
msf_gif 2.1 core GIF recording basic functionality
sdefl.h - core DEFLATE compression algorithm
sinfl.h - core DEFLATE decompression algorithm
GLAD 0.1.10a0 rlgl OpenGL extensions loading
stb_image 2.26 textures Multiple image formats loading
stb_image_resize 0.96 textures Image resizing functions
stb_image_write 1.15 textures Image writing to multiple formats
stb_perlin 0.5 textures Perlin noise generator
stb_truetype 1.24 text TTF/OTF fonts data loading
stb_rect_pack 1.00 text Rectangles packer, used on font packing
miniaudio 0.10.33 raudio Audio device management
stb_vorbis 1.14 (fork) raudio OGG audio data loading
dr_wav 0.12.29 raudio WAV audio data loading
dr_mp3 0.6.27 raudio MP3 audio data loading
dr_flac 0.12.29 raudio FLAC audio data loading
jar_mod 0.01 raudio MOD audio module loading
jar_xm 0.3.1 raudio XM audio module loading
par_shapes - models Geometric shapes generation
tinyobj_loader_c ? (Ray) models OBJ/MTL data loading
cgltf 1.10 models glTF models data loading

Note that some of the dependencies listed above are specific to only one of the platforms that raylib supports.

  • PLATFORM_DESKTOP: raylib uses on core 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 core 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 core 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 core 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 core 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, WinMM, GDI32, 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) and X11 window system 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) and X11 window system specific libs: X11, Xrandr, Xinerama, Xi, Xxf86vm and Xcursor
PLATFORM_DESKTOP:macOS OpenGL, Cocoa 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_RPI EGL, OpenGLES2.0, bcm_host Graphics run in native mode using bcm_host (no XWindows required) and inputs are also natively read (no XWindows input events), also requires linkage with libm(math), pthreads(POSIX threads) 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) 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.

Clone this wiki locally