Title: How to install FreeGlut(3.0.0 or 2.8.0)on OS X Yosemite
Tags: c++;c;macos;glut;freeglut
Question: smooth_opengl3.c:123:1: error: unknown type name 'PFNGLGENBUFFERSPROC'
PFNGLGENBUFFERSPROC gl_GenBuffers;
smooth_opengl3.c:124:1: error: unknown type name 'PFNGLBINDBUFFERPROC'
PFNGLBINDBUFFERPROC gl_BindBuffer;
smooth_opengl3.c:125:1: error: unknown type name 'PFNGLBUFFERDATAPROC'
PFNGLBUFFERDATAPROC gl_BufferData;
smooth_opengl3.c:126:1: error: unknown type name 'PFNGLCREATESHADERPROC'
PFNGLCREATESHADERPROC gl_CreateShader;
smooth_opengl3.c:127:1: error: unknown type name 'PFNGLSHADERSOURCEPROC'
PFNGLSHADERSOURCEPROC gl_ShaderSource;
smooth_opengl3.c:128:1: error: unknown type name 'PFNGLCOMPILESHADERPROC'
PFNGLCOMPILESHADERPROC gl_CompileShader;
smooth_opengl3.c:129:1: error: unknown type name 'PFNGLCREATEPROGRAMPROC'
PFNGLCREATEPROGRAMPROC gl_CreateProgram;
smooth_opengl3.c:130:1: error: unknown type name 'PFNGLATTACHSHADERPROC'
PFNGLATTACHSHADERPROC gl_AttachShader;
smooth_opengl3.c:131:1: error: unknown type name 'PFNGLLINKPROGRAMPROC'
PFNGLLINKPROGRAMPROC gl_LinkProgram;
smooth_opengl3.c:132:1: error: unknown type name 'PFNGLUSEPROGRAMPROC'
PFNGLUSEPROGRAMPROC gl_UseProgram;
smooth_opengl3.c:133:1: error: unknown type name 'PFNGLGETSHADERIVPROC'
PFNGLGETSHADERIVPROC gl_GetShaderiv;
smooth_opengl3.c:134:1: error: unknown type name 'PFNGLGETSHADERINFOLOGPROC'
PFNGLGETSHADERINFOLOGPROC gl_GetShaderInfoLog;
smooth_opengl3.c:135:1: error: unknown type name 'PFNGLGETPROGRAMIVPROC'
PFNGLGETPROGRAMIVPROC gl_GetProgramiv;
smooth_opengl3.c:136:1: error: unknown type name 'PFNGLGETPROGRAMINFOLOGPROC'
PFNGLGETPROGRAMINFOLOGPROC gl_GetProgramInfoLog;
smooth_opengl3.c:137:1: error: unknown type name 'PFNGLGETATTRIBLOCATIONPROC'
PFNGLGETATTRIBLOCATIONPROC gl_GetAttribLocation;
smooth_opengl3.c:138:1: error: unknown type name 'PFNGLVERTEXATTRIBPOINTERPROC'
PFNGLVERTEXATTRIBPOINTERPROC gl_VertexAttribPointer;
smooth_opengl3.c:139:1: error: unknown type name
'PFNGLENABLEVERTEXATTRIBARRAYPROC'
PFNGLENABLEVERTEXATTRIBARRAYPROC gl_EnableVertexAttribArray;
smooth_opengl3.c:140:1: error: unknown type name 'PFNGLGETUNIFORMLOCATIONPROC'
PFNGLGETUNIFORMLOCATIONPROC gl_GetUniformLocation;
smooth_opengl3.c:141:1: error: unknown type name 'PFNGLUNIFORMMATRIX4FVPROC'
PFNGLUNIFORMMATRIX4FVPROC gl_UniformMatrix4fv;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[4]: *** [smooth_opengl3-smooth_opengl3.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
In freeglut 3.0.0 there is no configure file.
I received this error when i compiled free glut (2.8.0) using (env CPPFLAGS="-I/opt/X11/include" LDFLAGS="-L/opt/X11/lib" ./configure) from this guide
A question related to this is also not helping Is it possible to build FreeGLUT on Mac OS X?
Comment: I have exactly the same problem. How did you install freeGlut on Yosemite finally?

Comment: Thanks. Finally I found "brew install freeglut" will install freeglut 3.0.0 on Yosemite. It works well.

Comment: Sorry I don't remember @Echo


Here is another answer: you could open progs/demos/smooth_opengl3/smooth_opengl3.c and search for PFNGLGENBUFFERSPROC
Now comment out #ifndef GL_VERSION_1_5 and #ifndef GL_VERSION_2_0 clauses. Rebuild and the errors should be gone.
Comment for this answer: Also had to do this for `[freeglut]/progs/demos/shapes/shapes.c` -- and note to everyone, `"progs"` directory is in the base directory of the extracted freeglut source archive.
Comment for this answer: And, if you're having other build troubles with freeglut, this link helped solved all other issues: https://sourceforge.net/p/freeglut/bugs/218/  Do the CMAKE edits after installing XQuartz, and then make sure that when the "make" build breaks, you run the "`ranlib`" command on your "`[builddir]/lib/libglut.a`" file.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 3, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2015:00:04/01/15', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<c++><c><macos><glut><freeglut>', 'Title': 'How to install FreeGlut(3.0.0 or 2.8.0)on OS X Yosemite', 'ViewCount': 1178, 'id': 29383836, 'user_AboutMe': '<p>Just a normal coder who is trying to find his interest and learn as much as I can along with helping people.</p>\n', 'user_AccountId': 4996055.0, 'user_DisplayName': 'Kanwar Baweja', 'user_Reputation': 183.0, 'user_Views': 69.0, 'user_id': 4016615.0}}