Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

Examples won't compile on macOS because it doesn't have pkg-config by default. #916

Open
ordnl opened this issue Sep 27, 2019 · 1 comment

Comments

@ordnl
Copy link

ordnl commented Sep 27, 2019

In examples/Makefile, GLFW3 is linked through pkg-config

GLFW3 := $(shell pkg-config --libs glfw3)

Unfortunately macOS does not have pkg-config by default, so GLFW3 is not linked, causing a compilation error.

This can be fixed by changing:

LIBS := $(GLFW3) -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib

to:

LIBS := -lglfw -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib

This happened on my macOS High Sierra (10.13.6)

@dumblob
Copy link
Contributor

dumblob commented Sep 27, 2019

Feel free to make a PR for a change. In this case I'm not sure whether there are some differences between different versions of macOS as we already introduced exceptions for darwin and it worked back then for the people using it (I do have unfortunately just an older macOS notebook, but few hundreds kilometers away from me 😉).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants