Raylib header file suddenly not working in vscode

Hello everybody,

I am new to this course, despite having some programming experience I have very little when it comes to vscode. I have participated in this c++ fundamentals course up until the classy clash project without issue. However, now on this project, suddenly I am receiving an error when attempting to include the raylib header file just as I did on the previous two projects by copying the vscode-template-main and then creating the main.cpp file from there. Likewise, I have also noticed that my previous two projects also do not work any longer. I am unsure if this is something I have done, or what. Any help is greatly appreciated.

Can you show me the cpp_properties.json file that’s inside .vscode? Also to confirm, what version of Raylib did you install?

Did you find a solution to this? I’m having the same issue all of a sudden. Same scenario. I’ve done the entire course up until now problem free (last worked on it about 5 days ago), and suddenly when I start this section I’m getting that error as well. For me it’s saying the compiler path in c_cpp_properties.json doesn’t work ( “C:/raylib/mingw/bin/gcc.exe”). The path in Dapper Dasher is different.

Hi Kynn,

That’s the old path for raylib in 3.7, the path with raylib 4.0 would be C:/raylib/w64devkit/bin/gcc.exe

To help me identify where this is cropping up, is this a project you downloaded from our gitlab repository or was it from the resources for a lecture?

It’s the files I downloaded when I started this section (Classy Clash) of the Fundamentals course. I tried replacing it with the .json from my Dapper Dasher folder. It works in Dapper Dasher, but when I try to debug my file for classy clash it says "terminal process failed to launch: Path to shell executable “C:\raylib\mingw\bin\mingw32-make.exe” does not exist. Here’s the text of the file from Dapper Dasher (that I made a copy of for this game):
{

"configurations": [

    {

        "name": "Win32",

        "includePath": [

            "C:/raylib/raylib/src/**",

            "${workspaceFolder}/**"

        ],

        "defines": [

            "_DEBUG",

            "UNICODE",

            "_UNICODE",

            "GRAPHICS_API_OPENGL_33",

            "PLATFORM_DESKTOP"

        ],

        "compilerPath": "C:/raylib/w64devkit/bin/gcc.exe",

        "cStandard": "c99",

        "cppStandard": "c++14",

        "intelliSenseMode": "gcc-x64"

    },

    {

        "name": "Mac",

        "includePath": [

            "${workspaceFolder}/**",

            "/opt/homebrew/include"

        ],

        "defines": [

            "_DEBUG",

            "UNICODE",

            "_UNICODE",

            "GRAPHICS_API_OPENGL_33",

            "PLATFORM_DESKTOP"

        ],

        "macFrameworkPath": [

            "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks"

        ],

        "compilerPath": "/usr/bin/clang",

        "cStandard": "c11",

        "cppStandard": "c++14",

        "intelliSenseMode": "clang-x64"

    },

    {

        "name": "Linux",

        "includePath": [

            "/home/linuxbrew/.linuxbrew/include",

            "${workspaceFolder}/**"

        ],

        "defines": [

            "_DEBUG",

            "UNICODE",

            "_UNICODE",

            "GRAPHICS_API_OPENGL_33",

            "PLATFORM_DESKTOP"

        ],

        "cStandard": "c11",

        "cppStandard": "c++14",

        "intelliSenseMode": "gcc-x64"

    }

],

"version": 4

}

1 Like

UPDATE: the files you download from Github under this section of the course seem to all be for the old version (3.7) where as the first two sections (Axe Game and Dapper Dasher) were both updated to 4.0. The path has to be changed in 4 different files in the .vscode folder. The other thread under the first Classy Clash video has a brute force way to make the changes and get it to run.

1 Like

If you want to save yourself time, you can copy the .vscode folder and the Makefile from the template project (also updated for 4.0) into your copy of Classy Clash.

In the meantime, I’ll get this fixed for the future. Thanks!

1 Like

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

Privacy & Terms