Ok, I have a question about the damn raylibXD

I’ve installed the raylib on Mac, followed the instructions. VS code have been uploaded already. Type "raylib’ and see this


The first thing we should confirm is whether the Raylib library has been installed and if so, the location it’s installed to.

In terminal, can you enter this command? brew --cellar raylib

If Raylib has been installed, it will output its location on your Mac.

I don’t see anything particular from the output


Yea I have it installed, but when I click on it, it opens Xcode

do you reply on Saturdays?

Ok, open c_cpp_properties.json (located in your .vscode folder for your project) and add that path to the “includePath” section for the Mac configuration. Example shown below.

same error after changing it like this. If I need to fully replace my code with yours, could you please paste it here?

I can do you one better, here’s the link to the template project we use for the course. (Found in the resources section for the installation lecture for Mac)

now I have this



Ok, now add your Raylib path to the include path in c_cpp_properties.json

You can ignore the warning about the Mac Framework path.

Hasn’t it already added? Look “name Mac” and below “opt homebrew”. By the way, I deleted parts with names for windows and linux, was I right? Or I should just paste everything as you have on git?
Or what exactly I supposed to type?

You want to add the path you got from typing brew —Cellar raylib into the include path.

Deleting the sections for Windows and Linux is fine if you don’t plan on using those platforms.

I need to type it into the terminal and paste it into the vs or what?

Could you tell me directly what to paste into the code so it finally gonna work

I don’t understand how you’re describing it, what to do

Alright, let me summarizing everything so far into a step-by-step guide.

First thing I had you do was type the command brew --Cellar raylib into your terminal so we could confirm that Raylib was installed and so we could know the installation path that Homebrew gave. That result was /opt/homebrew/Cellar/raylib

Next we need to take that path, /opt/homebrew/Cellar/raylib and add it to includePath list for Mac in c_cpp_properties.json file contained in our project template. This is how it should look, note that /opt/homebrew/include is not the same as your path for raylib (this may be something we need to address in an update to the template)

After this, VS Code should be able to see the raylib header files (you may need to attempt building your game before the error goes away, though).

thanks, that was a good explanation and a step forward. I indeed didn’t have another line in include path, but the problem remains

Without solving it I can’t complete the course. Maybe we connect via discord voice channel and I show you everything?

That I unfortunately am not able to do. That said, if you’re unable to build your project (Terminal > Run Task > Build Debug) then there’s likely a file access permissions issue with vs code going on.

Admittedly, troubleshooting Mac issues is a little difficult for me as I don’t have a Mac myself and am not super familiar with the OS

1 Like

Privacy & Terms