Mac Installation and Including Raylib

Hello and thanks for the new lecture for macOS.
Everything did pretty fine except I had a warning on the c_cpp_properties.json.
To get rid of it I had to change the macFrameworkPath into this (I have the latest version of Xcode on a mac M1) :

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

I noticed too that the path hombrew installed raylib in, was different on my computer than on the video.
On the video the install path is : /usr/local/Cellar/raylib/3.7.0
On my mac, hombrew installed it in : /opt/homebrew/Cellar/raylib/3.7.0

So in the lecture : 2_AG_CPP, when I need to include raylib, I have an error that says :

{
	"resource": "/Users/MyUserName/Documents/GameDev/project/main.cpp",
	"owner": "C/C++",
	"code": "1696",
	"severity": 8,
	"message": "unable to open source file  \"raylib.h\"",
	"source": "C/C++",
	"startLineNumber": 1,
	"startColumn": 1,
	"endLineNumber": 1,
	"endColumn": 20
}

I suppose it’s because the raylib is not on the same place than you… How do I correct that ?

Thank you for your time !

EDIT :
I had to change the #include “raylib.h” by #include “/opt/homebrew/Cellar/raylib/3.7.0/include/raylib.h” to get rid of the error.

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

Privacy & Terms