-
Run the following command in the terminal (
cmd
) inside thesrc
folder 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
mingw64
folder to your root directory (usuallyC:\
). - Add
C:\mingw64\bin
to your systemโs PATH environment variable. - Restart your terminal (and VSCode) and try running the command again.
- Move the
-
-
If the raylib
src
folder is not located atC:/raylib/raylib/src
, adjust the path in thetasks.json
file. -
To change the executable (
.exe
) name, update it intasks.json
and 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.