Skip to content
/ raylib-vscode-cpp Public template

Template for building Raylib 4.0 from source with ming32-make and compiling your project

Notifications You must be signed in to change notification settings

slurpyb/raylib-vscode-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raylib-vscode-cpp

Template for building Raylib 4.0 from source with ming32-make and compiling your project

Prereqs

  • Windows 7/10+
  • Mingw with mingw32-make, g++, gdb TODO: expand this to properly explain
  • Environment variables set so mingw32-build command can be run in this directory

clone raylib src repo to project root

$ git clone https://github.com/raysan5/raylib

Enter raylib src directory and build

$ cd raylib/src mingw32-make PLATFORM=PLATFORM_DESKTOP

Create header and library folders for your project src

$ mkdir ../../src/include/raylib -p && mkdir ../../src/lib

Copy headers and library files to your src directory

$ cp *.h ../../src/include/raylib && cp *.a ../../src/lib

Configure .vscode files

  • Ensure compilerPath in .vscode/c_cpp_properties.json points to your g++ installation ie
    "compilerPath": "C:/msys64/mingw64/bin/g++.exe"
  • Ensure paths are also correct for debugger (gdb) ie
    "miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe",

Create build folder in this repos root

$ mkdir build

Compile main.cpp to test

With main.cpp selected/active in vscode, run debug task or "Start Debugging" from run menu.

Optional: remove raylib header and library files from .gitignore

About

Template for building Raylib 4.0 from source with ming32-make and compiling your project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published