smcguffee wrote on Wednesday, September 24, 2014:
On OSX 10.5.8, I am having trouble building GLFW 3.0.4 because it wants to reference newer additions such as Cocoa struct members defined in 10.8. Can I compile on that old platform? If so, how?
example errors:
[ 2%] Building C object src/CMakeFiles/glfw.dir/clipboard.c.o
In file included from /Users/Shared/WHIMBATT/EXTERNAL/GLFW/glfw-3.0.4/src/internal.h:69,
from /Users/Shared/WHIMBATT/EXTERNAL/GLFW/glfw-3.0.4/src/clipboard.c:27:
/Users/Shared/WHIMBATT/EXTERNAL/GLFW/glfw-3.0.4/src/cocoa_platform.h:120: error: syntax error before ‘CGDisplayModeRef’
/Users/Shared/WHIMBATT/EXTERNAL/GLFW/glfw-3.0.4/src/cocoa_platform.h:120: warning: no semicolon at end of struct or union
/Users/Shared/WHIMBATT/EXTERNAL/GLFW/glfw-3.0.4/src/cocoa_platform.h:123: error: syntax error before ‘}’ token
/Users/Shared/WHIMBATT/EXTERNAL/GLFW/glfw-3.0.4/src/cocoa_platform.h:123: warning: type defaults to ‘int’ in declaration of ‘_GLFWmonitorNS’
/Users/Shared/WHIMBATT/EXTERNAL/GLFW/glfw-3.0.4/src/cocoa_platform.h:123: warning: data definition has no type or storage class
In file included from /Users/Shared/WHIMBATT/EXTERNAL/GLFW/glfw-3.0.4/src/clipboard.c:27:
/Users/Shared/WHIMBATT/EXTERNAL/GLFW/glfw-3.0.4/src/internal.h:268: error: syntax error before ‘_GLFWmonitorNS’
/Users/Shared/WHIMBATT/EXTERNAL/GLFW/glfw-3.0.4/src/internal.h:268: warning: no semicolon at end of struct or union
make[2]: [src/CMakeFiles/glfw.dir/clipboard.c.o] Error 1
make[1]: [src/CMakeFiles/glfw.dir/all] Error 2
make: *** [all] Error 2
Note, CGDisplayModeRef was added to OSX at version 10.8
I’m not sure how to tell GLFW not to try to use newer things than are available on 10.5.8, or if that is even possible. Any help would be appreciated. Thanks!
Sean