How to add Raylib to VS code?

Viewed 7604

I am a beginner at c++ and I would like to use raylib with vscode instead of using notpad++. does anybody know how to add raylib to vscode.

1 Answers

Here is the official guide on this topic : Using raylib in VSCode.


I am re-writing the instructions mentioned in the link (in simplified form) :

  1. Install Raylib from the official release binaries (Install using raylib_installer_v300.mingw.exe on Windows).

  2. Install VSCode.

  3. Now create a folder (say my_project) in which you want to keep the files of your project.

  4. Download files from this link and copy them into the folder you made at above step.


This should result in the following structure :

my_project
 |- .vscode
 |    |- c_cpp_properties.json
 |    |- launch.json
 |    |- settings.json
 |    |- tasks.json
 |- Makefile
 |- Makefile.Android
 |- main.c
 |- main.code-workspace

  1. Modify the paths inside in the files if gcc.exe is not there in C:/raylib/mingw/bin/.

  2. Install C/C++ for Visual Studio Code Extension.

  3. Then open VSCode in the folder you made (right-click on folder and open with VSCode).

  4. Open main.c file, press press F5. Your code should compile and run on debug mode.


If you face any problem in following the step by step instructions then please add a comment.

Related