-
Run the following command in the terminal (
cmd) inside thesrcfolder of raylib (usually located atC:\raylib\raylib\src):mingw32-make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC
1.1.
โ ๏ธ If you get an error (not just warnings), itโs probably because you donโt have the correct version of MinGW.-
Download the correct one from this link.
-
After downloading and extracting:
- Move the
mingw64folder to your root directory (usuallyC:\). - Add
C:\mingw64\binto your systemโs PATH environment variable. - Restart your terminal (and VSCode) and try running the command again.
- Move the
-
-
If the raylib
srcfolder is not located atC:/raylib/raylib/src, adjust the path in thetasks.jsonfile. -
To change the executable (
.exe) name, update it intasks.jsonand also inlaunch.json.
-
In the Run and Debug menu (left sidebar), select the appropriate task:
- Run Raylib (C) โ for C projects
- Run Raylib (C++) โ for C++ projects
-
Then press F5 to build and run.