Skip to content

raylib dependencies

Ray edited this page Apr 23, 2019 · 4 revisions

raylib 2.0 has no external dependencies, all required libraries are included with raylib sources.

Internally, raylib uses some libraries developed by other people, most of them used for some very specific task, like loading a specific fileformat or initialize audio device.

Here is the list of dependencies used by raylib. Note that most of these dependencies are single-header public-domain libraries that are included in raylib repository.

Library Version raylib module Notes
GLFW3 3.3.1 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.22 textures Multiple image formats loading
stb_image_resize 0.96 textures Image resizing functions
stb_image_write 1.13 textures Image writting to multiple formats
stb_perlin 0.4 textures Perlin noise generator
stb_truetype 1.21 text TTF/OTF fonts data loading
stb_rect_pack 1.00 text Rectangles packer, used on font packing
miniaudio 0.9.3 raudio Audio device management
stb_vorbis 1.14 (fork) raudio OGG audio data loading
dr_mp3 0.4.0 raudio MP3 audo data loading
dr_flac 0.9.7 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 ? models OBJ/MTL data loading (*)
cgltf 1.0 models glTF models data loading

Note that raylib supports multiple platforms and, consequently, not all library dependencies from above are the same for all supported platforms. As commented, some of the above libraries included in raylib are single-file header-only libraries (stb_image, stb_image_write, stb_image_resize, stb_vorbis, jar_mod, jar_xm, glad, mini_al), most of those libraries only depend on the C standard library for the target platform (msvcrt, libc, bionic) and are compiled together with raylib—no need for additional library linkage.

Despite raylib requires no external dependencies, there are some platform-specific system libraries that require to be linked on examples/games compilation. Here it is a table with required libraries:

PLATFORM external dependencies Notes
DESKTOP:Windows OpenGL, 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 design is very modular. Some modules can be removed on compilation if they're not required and consequently the libraries used by those modules.

Some modules can also be used as standalone, independently of raylib: rlgl, raudio.

One of raylib goals is to avoid any external dependencies, so I'll keep working to reduce this list as much as possible.

Clone this wiki locally
You can’t perform that action at this time.