Skip to content

OpenGL not found on newer macOS #2208

Description

@hryx

OpenGL on macOS seems to have moved recently, so projects that use it may fail to build:

/path/to/tetris/src/c.zig:1:9: error: C import failed
pub use @cImport({
^
/usr/local/include/GLFW/glfw3.h:140:12: note: 'OpenGL/gl.h' file not found
#include <OpenGL/gl.h>
^

The new path to the framework is:

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

...and seems to require XCode being fully installed.

See @mikdusan's workaround (I think using OpenGL from source rather than Homebrew): https://gist.github.com/mikdusan/0645a06f14c2167130ac4b00feed82ed#gistcomment-2883034

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions