-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
raylib libc dependency
Ray edited this page Apr 22, 2026
·
9 revisions
raylib is a C library and inevitably it depends on some implementation of C standard library (libc).
While working on raylib 3.0 I took some time to analyze that dependency in detail, no plans to remove it (maybe minimize it a bit) but I think it could be useful to have the knowledge where it is required.
| module | libc function | raylib function |
|---|---|---|
| rcore | exit() | TraceLog() |
| module | libc function | raylib function |
|---|---|---|
| rcore | sprintf() | TraceLog() |
| rcore | fprintf() | SaveFileText() |
| rcore | fopen() fseek() fread() fwrite() fclose() |
LoadFileData() SaveFileData() LoadFileText() SaveFileText() |
| module | libc function | raylib function |
|---|---|---|
| rcore | strlen() | GetFileNameWithoutExt() GetDirectoryPath() GetPrevDirectoryPath() OpenURL() InitEvdevInput() |
| rcore | strrchr() | GetExtension() EventThreadSpawn() |
| rcore | strcmp() | IsGamepadName() |
| rtext | strcmp() | TextIsEqual() |
| rtext | strcpy() | TextAppend() TextReplace() |
| rtext | strncpy() | TextToUtf8() TextReplace() |
| rtext | strcat() | TextJoin() |
| rtext | strstr() | several funcs. |
| rtextures | strlen() | ImageTextEx() |
| raudio | strcmp() | IsFileExtension() |
| module | libc function | raylib function |
|---|---|---|
| rmodels rshapes rcamera |
sinf() asinf() cosf() acosf() sqrtf() atan2f() |
several funcs. |
| raymath | sinf() cosf() acosf() tan() fabs() sqrtf() fminf() fmaxf() |
several funcs. |
| rcore | tan() atan2() |
BeginMode3D(), InitVrSimulator() |
| rtext | sqrtf() | GenImageFontAtlas() |
| module | libc function | raylib function |
|---|---|---|
| rcore | va_list, va_start(), vsprintf(), va_end() | TraceLog() |
| rtext | va_list, va_start(), vsprintf(), va_end() | TextFormat() |
Considering the size of raylib, there is not much dependency on libc... that's an interesting consideration for embedded devices development where custom libc implementations could be used.
www.raylib.com | itch.io | GitHub | Discord | YouTube
- Architecture
- Syntax analysis
- Data structures
- Enumerated types
- Static memory requirements
- External dependencies
- GLFW dependency
- libc dependency
- Platforms and graphics
- Input system
- Default shader
- Custom shaders
- Coding conventions
- Integration with other libs
- Working on Windows
- Working on macOS
- Working on GNU Linux
- Working on Chrome OS
- Working on FreeBSD
- Working on Raspberry Pi
- Working for Android
- Working for Web (HTML5)
- Working on exaequOS Web Computer
- Creating Discord Activities
- Working anywhere with CMake
- CMake Build Options
- raylib templates: Get started easily
- How To: Quick C/C++ Setup in Visual Studio 2022, GCC or MinGW
- How To: C# Visual Studio Setup
- How To: VSCode
- How To: Eclipse
- How To: Sublime Text
- How To: Code::Blocks