Skip to content

wilricknl/RaylibTemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raylib Template

Get up and running quickly with Raylib on Windows using Visual Studio. Follow the installation and add my template to your Visual Studio installation. You then are able to quickly create a new project where Raylib is already statically linked.

1. Requirements

2. Installation

2.1 Cloning Raylib

Open a new developer command prompt and enter the following commands to clone Raylib:

cd C:\
mkdir SDKs
git clone https://github.com/raysan5/raylib.git
cd raylib

Keep this command prompt open for the building stage.

2.2 Building

Next build the static configurations of Raylib as follows:

cd projects\VS2019
devenv raylib.sln /build "Release" /project raylib
devenv raylib.sln /build "Debug" /project raylib
devenv raylib.sln /build "Release|x86" /project raylib
devenv raylib.sln /build "Debug|x86" /project raylib

2.3 Setup environment

The template will use the environment variable RAYLIB as a pointer to the root folder of Raylib. Create a new user or system variable to point to the root folder of Raylib:

  • Variable name: RAYLIB
  • Variable value: C:\SDKs\raylib

2.4 Add template

From the releases page of this repository download Raylib Static.zip and put it in %UserProfile%\Documents\Visual Studio 2022\Templates\ProjectTemplates. Next time you open Visual Studio the new template shoud be added.

3. FAQ

How to remove the console window from my Raylib project?

Go to project settings and set the following properties for all configurations and all platforms:

  1. In Linker > System set SubSystem to Windows
  2. In Linker > Commandline add /ENTRY:"mainCRTStartup"