-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Use raylib with Code Blocks
Евгений Заонегин edited this page Mar 4, 2023
·
7 revisions
Use the template project: https://github.com/raysan5/raylib/tree/master/projects/CodeBlocks
Guide provided by Mark in raylib forum
NOTE: This guide is intended for Code:Blocks on Windows, using MinGW compiler.
First, under Project Settings check the box that says, "This is a custom Makefile".
Then, in your project's folder create a file named Makefile and paste the following:
files = main.c
output = main.exe
Debug:
gcc -g -o obj/Debug/$(output) $(files) \
c:/raylib/raylib/raylib_icon \
-Ic:/raylib/raylib/src \
-Lc:/raylib/MinGW/bin \
-Lc:/raylib/MinGW/include/GLFW \
-Iexternal -lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm \
-std=c99 -Wl,-allow-multiple-definition -Wl,--subsystem,windows -Wall
Release:
gcc -s -o obj/Release/$(output) $(files) \
c:/raylib/raylib/raylib_icon \
-Ic:/raylib/raylib/src \
-Lc:/raylib/MinGW/bin \
-Lc:/raylib/MinGW/include/GLFW \
-Iexternal -lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm \
-std=c99 -Wl,-allow-multiple-definition -Wl,--subsystem,windows
cleanDebug:
del /F /Q obj/Debug/*.*
cleanRelease:
del /F /Q obj/Release/*.*
Change files and output variables as you see fit.
www.raylib.com | itch.io | GitHub | Discord | YouTube
- 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
- 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)
- 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