Enjoy your development journey with Raylib! 🎮
A versatile template for Raylib projects using C++ and CMake, optimized for MacOS and Windows with full integration for Visual Studio Code.
This template automatically checks for the presence of Raylib and Raygui libraries during build. If missing, they will be automatically downloaded into the build folder to ensure a smooth setup.
-
Install prerequisites:
-
Open the folder in VS Code:
- Use the command:
code .
- Use the command:
Homebrew is the recommended package manager for managing libraries on macOS.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"brew install raylib cmake
-
Install MSYS2:
- Download from here.
-
Set up MSYS2 for C++ development:
-
Open the UCRT64 terminal environment and run the following command:
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-gdb mingw-w64-ucrt-x86_64-lldb
-
-
Update the Windows System Environment PATH:
-
Add the following paths:
C:\msys64\ucrt64\bin; c:\msys64\usr\bin
-
-
Install Visual Studio Code:
- Download from here.
-
Open the folder in VS Code:
- Use the command:
code .
- Use the command:
Once the environment is set up:
- Open the folder in Visual Studio Code.
- Press F5 to start debugging the application.
- Select Build and Launch from the menu.
- The template will generate a
/buildfolder with an executable named after the main folder.
