One of the main objectives with raylib was minimizing external dependencies. Developing a full-videogame-featured library avoiding external dependencies is a hard task.
One of the objectives of raylib was minimizing external dependencies. Developing a full-videogame-featured library avoiding external dependencies is a hard task.
Here it is a list with the external dependencies used by raylib; note that most of those dependencies are [single-header public-domain libraries](https://github.com/nothings/stb) that are [directly copied into raylib repository](https://github.com/raysan5/raylib/tree/develop/src/external).
@ -7,30 +7,35 @@ External dependencies:
Library | Used Version | raylib module | Notes
--- | :---: | :---: | ---
[GLFW3](http://www.glfw.org/) | 3.2 | [core](https://github.com/raysan5/raylib/blob/develop/src/core.c) | Window and input management on desktop platforms
[stb_truetype](https://github.com/raysan5/raylib/blob/develop/src/external/stb_truetype.h) | 1.11 | [text](https://github.com/raysan5/raylib/blob/develop/src/text.c) | TTF font data loading
Note that raylib support multiple platforms and, consequently, not all library dependencies from above are the same for all the 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`), those libraries only depend on the C standard library for the target platform (libc, bionic) and are compiled together with raylib, no need for additional library linkage. But some other libraries are required with external linkage. Here it is a detailed list:
Note that [physac](https://github.com/raysan5/raylib/blob/develop/src/physac.h) and [rlua](https://github.com/raysan5/raylib/blob/develop/src/rlua.h) are additional raylib modules, single-header and not included in default raylib compilation; if those modules are not required, `pthread Win32` and `lua` dependencies are neither required.
Note that raylib support multiple platforms and, consequently, not all library dependencies from above are the same for all the 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`), those libraries only depend on the C standard library for the target platform (libc, bionic) and are compiled together with raylib, no need for additional library linkage. But some other libraries require external linkage. Here it is a detailed list:
PLATFORM | external dependencies | Notes
--- | :---: | ---
DESKTOP:Windows | `GLFW3`, `OpenGL`, `OpenAL` | Note that GLFW3 also requires linkage with `libgdi32`
DESKTOP:Linux | `GLFW3`, `OpenGL`, `OpenAL` | Note that Linux also requires linkage with `libm`(math), `pthreads`(POSIX threads), `dl`(dynamic loading). Note that GLFW3 also requires linkage with `XWindows` specific libs: `X11`, `Xrandr`, `Xinerama`, `Xi`, `Xxf86vm` and `Xcursor`
DESKTOP:OSX | `GLFW3`, `OpenGL`, `OpenAL` | Note that GLFW3 also requires linkage with `Cocoa` framework
Android | `EGL`, `OpenGLES2.0`, `OpenAL` | Note that code must be compiled using `Android NDK` libraries, `android_native_app_glue` module is included in raylib shared library compilation and `OpenAL` android implementation also requires linkage against `OpenSLES` audio library.
Raspberry Pi | `EGL`, `OpenGLES2.0`, `OpenAL`, `bcm_host` | Note that the only external libraries required (aside of the default ones that come with the system) is `OpenAL`, graphics run in native mode (no `XWindows` required) and inputs are read also natively (no `XWindows` input events)
HTML5 (Web) | `GLFW3`, `WebGL`, `OpenAL` | Note that code must be compiled using `emscripten SDK`, all required libraries are included in the package, actually it uses javascript versions of `GLFW3` (incomplete implementation) and `OpenAL` (features limited).
One of the raylib goals is to keep external dependencies to minimum and so I keep working to reduce this list as much as possible.
DESKTOP:Windows | `GLFW3`, `OpenGL`, `OpenAL` | GLFW3 also requires linkage with `libgdi32`
DESKTOP:Linux | `GLFW3`, `OpenGL`, `OpenAL` | Linux also requires linkage with `libm`(math), `pthreads`(POSIX threads), `dl`(dynamic loading). GLFW3 also requires linkage with `XWindows` specific libs: `X11`, `Xrandr`, `Xinerama`, `Xi`, `Xxf86vm` and `Xcursor`
DESKTOP:OSX | `GLFW3`, `OpenGL`, `OpenAL` | GLFW3 also requires linkage with `Cocoa` framework
ANDROID| `EGL`, `OpenGLES2.0`, `OpenAL` | Code must be compiled using `Android NDK` libraries, `android_native_app_glue` module is included in raylib shared library compilation and `OpenAL` android implementation also requires linkage against `OpenSLES` audio library.
RASPBERRY PI | `EGL`, `OpenGLES2.0`, `OpenAL`, `bcm_host` | The only external library required (aside of the default ones that come with the system, like `bcm_host`) is `OpenAL`, graphics run in native mode (no `XWindows` required) and inputs are also natively read (no `XWindows` input events)
HTML5 (Web) | `GLFW3`, `WebGL`, `OpenAL` | Code must be compiled using `emscripten SDK`, all required libraries are included in the package, actually it uses javascript versions of `GLFW3` (incomplete implementation) and `OpenAL` (features limited).
OCULUS RIFT CV1 | `GLFW3`, `OpenGL`, `OpenAL`, `libOVR` | Basically, same as DESKTOP platforms and `libOVR` runtime library (link against `libOVRRT32_1.dll`)
Note that raylib design is [very modular](http://www.raylib.com/img/raylib_architecture.png), some modules could be dropped if not required ([audio](https://github.com/raysan5/raylib/blob/develop/src/audio.c), [shapes](https://github.com/raysan5/raylib/blob/develop/src/shapes.c), [models](https://github.com/raysan5/raylib/blob/develop/src/models.c)...) and consequently the libraries used by those modules. Some modules can also be used as standalone, *independently* of raylib: [rlgl](https://github.com/raysan5/raylib/blob/develop/examples/rlgl_standalone.c), [audio](https://github.com/raysan5/raylib/blob/develop/examples/audio_standalone.c).
As stated, one of the raylib goals is to keep external dependencies to minimum and so I keep working to reduce this list as much as possible.