Error When Running Build Task in VSCode

Hi! When I try to build the task, it fails with the following error:

" * Executing task in folder Your First Program GameDev Course C++: C:/raylib/w64devkit/bin/mingw32-make.exe RAYLIB_PATH=C:/raylib/raylib PROJECT_NAME=test OBJS=*.cpp BUILD_MODE=DEBUG

mingw32-make test
make[1]: Entering directory ‘C:/GameDev/Your First Program GameDev Course C++’
make[1]: *** No rule to make target ‘*.cpp’, needed by ‘test’. Stop.
make[1]: Leaving directory ‘C:/GameDev/Your First Program GameDev Course C++’
make: *** [Makefile:388: all] Error 2

  • The terminal process “C:\raylib\w64devkit\bin\mingw32-make.exe ‘RAYLIB_PATH=C:/raylib/raylib’, ‘PROJECT_NAME=test’, ‘OBJS=*.cpp’, ‘BUILD_MODE=DEBUG’” terminated with exit code: 2.
  • Terminal will be reused by tasks, press any key to close it."

Granted I am using raylib 5.0, so maybe that broke something. It seems to be pulling the file name without the extension properly, it says that no rule exists to make the file.

Raylib 5.0 is not the source of the problem.

It looks like you placed your cpp file in the .vscode folder. The makefile for the project expects cpp and header files to be located in the root folder of the project.

1 Like

:man_facepalming: Ah, the problem exists between keyboard and chair. Thanks for clearing it up! It works now.

Hey, it happens. Glad I could help!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms