mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Page:
raylib libc dependency
Pages
CMake Build Options
Community Resources
Compile for OSX
Create Visual Studio 2019 Project
Create Visual Studio Project
Creating Discord Activities with raylib
Frequently Asked Questions
Home
Install and configure Touchscreen Drivers (RPi)
Quick Setup for Windows with Visual Studio 2022, GCC, or MinGW
Redirect raylib output to Framebuffer 1
Screen Recording
Use multiple windows
Use raylib with Code Blocks
Use raylib with Eclipse
Use raylib with Sublime Text
Using BMFonts
Using SPI Displays with raylib
Using raylib in VSCode
Using raylib with Cpp
Visual Studio C# Setup
Working for Android (on Linux)
Working for Android (on macOS)
Working for Android
Working for Web (HTML5)
Working on Chrome OS
Working on FreeBSD
Working on GNU Linux
Working on Raspberry Pi
Working on Windows
Working on exaequOS
Working on macOS
Working with CMake
raylib GLFW dependency
raylib architecture
raylib coding conventions
raylib data structures
raylib default shader
raylib dependencies
raylib enumerated types
raylib generic uber shader and custom shaders
raylib input system
raylib integration with other libraries
raylib libc dependency
raylib platforms and graphics
raylib syntax analysis
raylib templates
Clone
7
raylib libc dependency
Ray edited this page 2021-11-15 10:48:04 +01:00
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.
stdlib.h
| module | libc function | raylib function |
|---|---|---|
| core | srand() | InitTimer() |
| core | abs() rand() |
GetRandomValue() |
| core | atexit() | InitKeyboard() InitTerminal() |
| shapes | fabs() | CheckCollisionCircleRec() GetCollisionRec() |
| utils | exit() | TraceLog() |
stdio.h
| module | libc function | raylib function |
|---|---|---|
| utils | sprintf() | TraceLog() |
| utils | fprintf() | SaveFileText() |
| utils | fopen() fseek() fread() fwrite() fclose() |
LoadFileData() SaveFileData() LoadFileText() SaveFileText() |
string.h
| module | libc function | raylib function |
|---|---|---|
| core | strlen() | GetFileNameWithoutExt() GetDirectoryPath() GetPrevDirectoryPath() OpenURL() InitEvdevInput() |
| core | strrchr() | GetExtension() EventThreadSpawn() |
| core | strcmp() | IsGamepadName() |
| text | strcmp() | TextIsEqual() |
| text | strcpy() | TextAppend() TextReplace() |
| text | strncpy() | TextToUtf8() TextReplace() |
| text | strcat() | TextJoin() |
| text | strstr() | several funcs. |
| textures | strlen() | ImageTextEx() |
| raudio | strcmp() | IsFileExtension() |
math.h
| module | libc function | raylib function |
|---|---|---|
| models, shapes, camera | sinf() asinf() cosf() acosf() sqrtf() atan2f() |
several funcs. |
| raymath | sinf() cosf() acosf() tan() fabs() sqrtf() fminf() fmaxf() |
several funcs. |
| core | tan() atan2() |
BeginMode3D(), InitVrSimulator() |
| text | sqrtf() | GenImageFontAtlas() |
stdarg.h
| module | libc function | raylib function |
|---|---|---|
| text | va_list, va_start(), vsprintf(), va_end() | TextFormat() |
| utils | va_list, va_start(), vsprintf(), va_end() | TraceLog() |
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.
Frequently Asked Questions
Library Design
- Architecture
- Syntax analysis
- Data structures
- Enumerated types
- External dependencies
- GLFW dependency
- libc dependency
- Platforms and graphics
- Input system
- Default shader
- Custom shaders
- Coding conventions
- Integration with other libs
Development Platforms
- 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
IDE Configurations
- 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
Misc Help
www.raylib.com | itch.io | GitHub | Discord | YouTube