Skip to content

raylib dependencies

Ray edited this page Apr 14, 2021 · 37 revisions

While raylib uses libraries that were developed by other people (for specific tasks, like supporting a particular file format), this is all internal. raylib has no external dependencies. All of the required libraries are bundled with the raylib sources.

The following table lists the raylib dependencies. Most are single-header, public-domain libraries.

NOTE: Last updated on 6th February 2020 for the raylib 3.0 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 Extensions initialization for OpenGL 3.3 Core
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 one of the platforms that raylib supports.

As mentioned above, some of the listed libraries (stb_image, stb_image_write, stb_image_resize, stb_vorbis, jar_mod, jar_xm, glad and mini_al) are included with raylib as single-file, header-only libraries, and generally only depend on the C standard library for the target platform (msvcrt, libc, bionic et cetera). They are compiled together with raylib (no need to manually link libraries).

Though raylib has no external dependencies, there are some platform-specific system libraries that do need to be linked when compiling the collection of examples. The following table lists the required libraries.

PLATFORM external dependencies Notes
DESKTOP:Windows OpenGL, winmm, gdi32, user32, kernel32 Required for window creation
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
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
DESKTOP:OSX OpenGL, Cocoa Required for window creation
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)
RASPBERRY PI 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).
HTML5 (Web) 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