Fatal error: 'raylib.h' file not found

OS: Macos Sonoma 14.2.1
Compiler: Clang

I downloaded Raylib to my mac using Macports NOT Homebrew

I prefer using macports to homebrew and would like to keep using it for the rest of the course if that is not a problem.

#include “raylib.h” gives me a file not found error. Earlier it was giving me an “update your include path” message but i fixed that by changing the include path from /opt/homebrew/include to /opt/local/include

Please can someone help me out…

Are you using Terminal > Run Task > Build Debug ? This utilizes the makefile to compile the project, this may need to be modified to use the different raylib path, but I do not have a mac nor am I familiar with Macports so I am not sure if this is necessary.

The only recommendation I can give at this point is to find the exact location of raylib within macports and use that path in your includepath. This is something that has had to be done in the past with Homebrew as paths change depending on MacOS version or Homebrew versions.

Already done that, I changed the include path from /opt/homebrew/include to /opt/local/include, thats where macports installed raylib.

Im not sure if i can even continue on with this course if this cant be figured out.

I’m not sure if that’s good enough. For example, when students have issues with the path when using homebrew, the command brew -Cellar raylib gives a path that’s similar to opt/homebrew/Cellar/raylib. I imagine you can navigate to /opt/local/include in finder and confirm the exact location of raylib.

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

Privacy & Terms