Unable to Run programme. Problem in launch.json

Hello Team,

I am very new to VS Code and debug env. Tried launching game to window following game example only for “cppdbg” not supported error to popup.

Found squiddly under some parameters too, like :Property at stopAtEntry is not allowed

…and also cppdbg is not an option in terminal, all I see is the powershell. Trying to tinker with vscode-template from gitlab, using raylib. Am I using the wrong version combinations?

Just to confirm, which version of Raylib did you install?

raylib 4.0 Windows Installer (with MinGW compiler) (69 MB)

Ok, the newest version of Raylib changed the installation path for the compiler and debugger. Can you go into cpp_properties, launch, and tasks and update and change C:/raylib/mingw/bin to C:/raylib/w64devkit/bin ?

Also, you’ll want to redownload and reinstall Raylib. Some missing files in the installation where patched in.

Alright, trying that right away.

Unfortunately I’m still getting the same error

Alright, so I realised I was using an old version of c/c++ extension in vscode

…must also be changed in the Makefile as well

Define compiler path on Windows

COMPILER_PATH ?= C:/raylib/w64devkit/bin

new issue now is it cannot find my file :sleepy:

Sorry for forgetting about the makefile!

Can you show me the error from your terminal?

Executing task in folder vscode-template: C:/raylib/w64devkit/bin/mingw32-make.exe RAYLIB_PATH=C:/raylib/raylib PROJECT_NAME=axe_game OBJS=*.cpp BUILD_MODE=DEBUG <

mingw32-make axe_game
make[1]: Entering directory ‘E:/TryThis/vscode-template’
g++ -o axe_game *.cpp -Wall -std=c++14 -D_DEFAULT_SOURCE -Wno-missing-braces -g -O0 C:/raylib/raylib/src/raylib.rc.data -I. -IC:/raylib/raylib/src -IC:/raylib/raylib/src/external -L. -LC:/raylib/raylib/src -LC:/raylib/raylib/src -lraylib -lopengl32 -lgdi32 -lwinmm -DPLATFORM_DESKTOP
C:/raylib/w64devkit/bin/ld.exe: C:\Users\User\AppData\Local\Temp\cc3LWDim.o:E:\TryThis\vscode-template/hello.cpp:3: multiple definition of `main’; C:\Users\User\AppData\Local\Temp\ccqXBpCH.o:E:\TryThis\vscode-template/axe_game.cpp:4: first defined here
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:392: axe_game] Error 1
make[1]: Leaving directory ‘E:/TryThis/vscode-template’
make: *** [Makefile:388: all] Error 2
The terminal process terminated with exit code: 2

Terminal will be reused by tasks, press any key to close it.

You can only have one CPP file with a definition of the main function. It looks like you have hello.cpp and axe_game.cpp in the same project folder.

Yes, that’s true (they are in the same folder)

I commented out the Main Function from the hello.cpp file and voila!

Thanks a lot @Tuomo_T .Really appreciate the effort

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

Privacy & Terms