Skip to content

raylib dependencies

Carl Smith edited this page Oct 9, 2020 · 38 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
rgif 0.5 core GIF recording basic functionality
GLAD 0.1.10a0 rlgl Extensions initialization for OpenGL 3.3 Core
stb_image 2.25 textures Multiple image formats loading
stb_image_resize 0.96 textures Image resizing functions
stb_image_write 1.14 textures Image writting 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 raudio Audio device management
stb_vorbis 1.14 (fork) raudio OGG audio data loading
dr_mp3 0.4.7 raudio MP3 audo data loading
dr_flac 0.11.10 raudio FLAC audo data loading
jar_mod 0.01 raudio MOD audio module loading
jar_xm 0.01 raudio XM audio module loading
par_shapes ? models Geometric shapes generation (*)
tinyobj_loader_c ? (Ray) models OBJ/MTL data loading (*)
cgltf 1.5 models glTF models data loading

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

As mentioned, some of the listed libraries (stb_image, stb_image_write, stb_image_resize, stb_vorbis, jar_mod, jar_xm, glad, 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). 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