#include <OpenGL/gl.h> in mac os x to fix compile issues #27

wants to merge 1 commit into

7 participants


get an occurrence of:
src/screengrab.c:194: error: ‘GL_FRONT’ undeclared (first use in this function)
Where GL_FRONT is defined in OpenGL/gl.h


after apply gl.h it pass compiling in OSX 10.7 but get black screen using bitmap.capture_screen(..)


since CGLSetFullScreen and CGLSetFullScreenOnDisplay is deprecated in 10.6 and 10.7 how make it captured displays working on 10.7.3 :-(


I'm getting this same issue (after including gl.h in screen grab.c autopy compiles, but screen captures are entirely black). This is on 10.7.3. Has anyone been able to solve this issue? I'd have guessed it had something to do with the removal of CGDisplayBitsPerPixel, but polyfilling it doesn't solve the problem.


/* TODO: CGDisplayBitsPerPixel() is deprecated in Snow Leopard; I'm not sure of the replacement function. */

Well shit.

I need autopy for a project thats due in a couple of months and I'm contemplating replacing the deprecated functions...not sure how difficult that will be.


I think you need to replace the deprecated functions. I get nine errors on Mountain Lion, it should not be too bad only nine updates.


How did you log the errors?


when I did >sudo python setup.py install, the errors appeared in the output.


This post on SO gives the exact same errors that I was getting:


I'm not planning on fixing this (since this project is quite dead), but if anyone's looking for the right API to use, search for CGDisplayCreateImage.

@msanders msanders closed this Nov 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment