My ide is xcode and I want to stress this I am a newbie at these kind of things. I am trying to learn opengl by following this tutorial
removed due to rank
It says to use cmake to build the project solution however attempting to do that seemed to not work with my setup. They used VSC and I used xcode and attempting to replicate what they did didnt work. So I decided to just manually link the headers. I downloaded the source code for glfw and glad and put them in my solution in this order
OpenGL header already included, remove this include, glad already provides it
Doing some simple troubleshooting led me to believe that the glfw header should have been included first, however as you can see I already had been doing that. I checked my binary library and I don’t have any sort of opengl framework in there
removed due to rank
I have no idea why this is happening. I am on the latest release of macOS, Big Sur 11.3.1. Any help is appreciated, thanks!
Doing that resulted in the same error. And @FurredDragon that only led to a bad access error to. I should probably note that I believe mac deprecated opengl if that has anything to do with it
Everything I have described in the original post is true. The includes are happening in the main c++ file and glfw is linked confirmed and I am pretty confident I have a directory to glad too. They are in the same include folder after all. However like I said, it says I already have opengl linked, when I dont. Attempting to do what you told me to do led to a bad access 0x0 error.
Fixed it, the problem was that I was doing something very noob. I forgot to generate my cmake build and thus I was using some other library (I assume it was from a different version of glfw)
For any other future internet explorers you may also get some other errors related to the build architecture. 100’s of them. To fix that you need to provide the abstraction from apples metal api to the glfw api by adding these frameworks
Appkit - for docks and icons, etc
Foundation - access to apples window creation sdk
CoreFoundation - this needs to be here for foundation to work
CoreGraphics - pipeline for your gpu and metal, think of this as like the glfw for apple
Make sure also in your header paths to start them as “$(PROJECT_DIR)/” instead of the sdr root you get from dragging the folder in.