# Trouble compiling GLFW 2.7.7 on Mac OS X Leopard (10.5)

**URL:** <https://discourse.glfw.org/t/trouble-compiling-glfw-2-7-7-on-mac-os-x-leopard-10-5/539>\
**Category:** support\
**Created:** [April 3, 2013, 2:22am UTC](https://discourse.glfw.org/t/trouble-compiling-glfw-2-7-7-on-mac-os-x-leopard-10-5/539 "2013-04-03T02:22:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [April 3, 2013, 2:22am UTC](https://discourse.glfw.org/t/trouble-compiling-glfw-2-7-7-on-mac-os-x-leopard-10-5/539/1 "2013-04-03T02:22:36Z")

</div>

**[mrmormon](https://sourceforge.net/u/mrmormon/)** wrote on [Wednesday, April 03, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/d01601cb/#6192):

I’m trying to compile GLFW 2.7.7 (the latest as of April 1, 2013) on Mac OS X Leopard (10.5). I installed Xcode 3.1.4 and put the GLFW folder in /Developer. The GLFW readme says I just have to run make cocoa in Terminal from the root GLFW directory, but I get this huge mess of errors:

new-host:glfw-2.7.7 user$ make cocoa  
cd lib/cocoa && make -f Makefile.cocoa  
cc -O2 -g -c -I. -I… -Wall -fno-common -o enable.o …/enable.c  
In file included from …/enable.c:31:  
…/internal.h:58:20: error: stdlib.h: No such file or directory  
…/internal.h:59:20: error: string.h: No such file or directory  
…/internal.h:60:19: error: stdio.h: No such file or directory  
In file included from …/internal.h:92,  
from …/enable.c:31:  
./platform.h:40:53: error: ApplicationServices/ApplicationServices.h: No such file or directory  
./platform.h:44:21: error: pthread.h: No such file or directory  
In file included from ./platform.h:46,  
from …/internal.h:92,  
from …/enable.c:31:  
./…/…/include/GL/glfw.h:167:25: error: OpenGL/gl.h: No such file or directory  
./…/…/include/GL/glfw.h:170:26: error: OpenGL/glu.h: No such file or directory  
In file included from …/internal.h:92,  
from …/enable.c:31:  
./platform.h:51: error: syntax error before ‘_’ token  
./platform.h:51: warning: type defaults to ‘int’ in declaration of ‘PFNGLGETSTRINGIPROC’  
./platform.h:51: warning: parameter names (without types) in function declaration  
./platform.h:51: warning: data definition has no type or storage class  
./platform.h:63: error: syntax error before ‘GLFWintptr’  
./platform.h:63: warning: type defaults to ‘int’ in declaration of ‘GLFWintptr’  
./platform.h:63: warning: data definition has no type or storage class  
./platform.h:120: error: syntax error before ‘PFNGLGETSTRINGIPROC’  
./platform.h:120: warning: no semicolon at end of struct or union  
./platform.h:129: error: syntax error before ‘}’ token  
./platform.h:162: error: syntax error before ‘CGEventSourceRef’  
./platform.h:162: warning: no semicolon at end of struct or union  
./platform.h:164: warning: type defaults to ‘int’ in declaration of ‘\_glfwLibrary’  
./platform.h:164: warning: data definition has no type or storage class  
./platform.h:211: error: syntax error before ‘pthread\_t’  
./platform.h:211: warning: no semicolon at end of struct or union  
./platform.h:218: error: syntax error before ‘pthread\_mutex\_t’  
./platform.h:218: warning: no semicolon at end of struct or union  
./platform.h:226: error: syntax error before ‘}’ token  
./platform.h:226: warning: type defaults to ‘int’ in declaration of ‘\_glfwThrd’  
./platform.h:226: warning: data definition has no type or storage class  
In file included from …/enable.c:31:  
…/internal.h:134: error: syntax error before ‘GLFWintptr’  
…/internal.h:134: warning: no semicolon at end of struct or union  
…/internal.h:135: warning: type defaults to ‘int’ in declaration of ‘\_GLFWfbconfig’  
…/internal.h:135: warning: data definition has no type or storage class  
…/internal.h:154: error: syntax error before ‘FILE’  
…/internal.h:154: warning: no semicolon at end of struct or union  
…/internal.h:158: error: syntax error before ‘}’ token  
…/internal.h:158: warning: type defaults to ‘int’ in declaration of ‘\_GLFWstream’  
…/internal.h:158: warning: data definition has no type or storage class  
…/internal.h:208: warning: type defaults to ‘int’ in declaration of ‘\_GLFWfbconfig’  
…/internal.h:208: error: syntax error before ‘_’ token  
…/internal.h:246: warning: type defaults to ‘int’ in declaration of ‘GLubyte’  
…/internal.h:246: error: syntax error before ‘_’ token  
…/internal.h:250: error: syntax error before ‘_’ token  
…/internal.h:251: error: syntax error before ‘_’ token  
…/internal.h:252: error: syntax error before ‘_’ token  
…/internal.h:253: error: syntax error before ‘_’ token  
…/internal.h:254: error: syntax error before ‘_’ token  
…/internal.h:255: error: syntax error before ‘_’ token  
…/internal.h:258: error: syntax error before ‘_’ token  
…/internal.h:261: error: syntax error before ‘_’ token  
…/internal.h:261: warning: type defaults to ‘int’ in declaration of ‘\_GLFWfbconfig’  
…/internal.h:261: error: syntax error before ‘_’ token  
…/internal.h:263: warning: type defaults to ‘int’ in declaration of ‘\_glfwChooseFBConfig’  
…/internal.h:263: warning: data definition has no type or storage class  
…/enable.c: In function ‘enableMouseCursor’:  
…/enable.c:46: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:46: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:54: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:55: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:64: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:66: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:72: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:72: error: ‘GL\_FALSE’ undeclared (first use in this function)  
…/enable.c:72: error: (Each undeclared identifier is reported only once  
…/enable.c:72: error: for each function it appears in.)  
…/enable.c: In function ‘disableMouseCursor’:  
…/enable.c:81: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:81: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:90: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:90: error: ‘GL\_TRUE’ undeclared (first use in this function)  
…/enable.c: In function ‘enableSystemKeys’:  
…/enable.c:160: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:168: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:168: error: ‘GL\_FALSE’ undeclared (first use in this function)  
…/enable.c: In function ‘disableSystemKeys’:  
…/enable.c:177: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:185: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c:185: error: ‘GL\_TRUE’ undeclared (first use in this function)  
…/enable.c: In function ‘enableAutoPollEvents’:  
…/enable.c:214: error: invalid use of incomplete typedef ‘\_GLFWwin’  
…/enable.c: In function ‘disableAutoPollEvents’:  
…/enable.c:223: error: invalid use of incomplete typedef ‘\_GLFWwin’  
make[1]: \*\*\* [enable.o] Error 1  
make: \*\*\* [cocoa] Error 2

Any ideas what’s wrong? GCC 4.0.1 should be the default compiler, since I didn’t change any Xcode settings.

---

<div class="post-metadata">

**Author:** ![SergeiGoetheScriabin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/sergeigoethescriabin/32/925_2.png) [@SergeiGoetheScriabin](https://discourse.glfw.org/u/SergeiGoetheScriabin)\
**Post date:** [July 29, 2024, 9:26pm UTC](https://discourse.glfw.org/t/trouble-compiling-glfw-2-7-7-on-mac-os-x-leopard-10-5/539/2 "2024-07-29T21:26:26Z")

</div>

Hey, I made a post that may be able to help.
