-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Quick Setup for Windows with Visual Studio 2022, GCC, or MinGW
The quickstart is a cross platform template for all desktop platforms that will setup raylib automatically.
https://github.com/raylib-extras/raylib-quickstart
It works with many compilers on windows, linux and Mac OS. Works with makefiles, visual studio, and VSCode.
Simply follow the instructions in that link and you will be done, you do not need to use the rest of this document.
Get the raylib sources from https://github.com/raysan5/raylib Download the zip file, or clone the repository. It doens't matter what one you use. Put the raylib sources in a folder called raylib inside your game folder (The same folder this file is in). The folder must be named raylib, it can not be raylib-master. The raylib folder should contain all the sources from raylib (including the 'src' folder)
This repository is pre-populated with the raylib game template. It is a great starting point for your game. https://github.com/raysan5/raylib-game-template.
If you want to have a different starting point, simply replace the files in the game folder with your own files.
By default this process is setup to build a project using C. If you want to use C++, you can replace these files with cpp files.
For windows users, there are two batch files you can use depending on what compiler you are using. For linux users you can simply use a terminal. Only do ONE of these options depending on your compiler and platform.
Visual Studio users should run
premake-VisualStudio.bat
This will generate a Visual Studio project.
Run the batch file.
premake-mingw.bat
This will generate a makefile for you
cd to the game folder and run
./premake5 gmake2
This will generate a makefile for you.
Only do ONE of these options depending on your compiler and platform.
Double click the .sln file that was generated in the folder. If you are using Visual Studio 2022 you will be asked to upgrade the project, the defaults are fine, accept them and it will load. From here you can use the project as normal.
Open your compiler terminal (w64devkit if you are using it), change to the game folder and type
make
This will build your game
Open your terminal, change to the game folder and type.
make
This will build your starting game template
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)
- 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