Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

XFiles51

macrumors newbie
Original poster
Feb 6, 2016
3
0
I've added OpenGL.framework to my project but now I still get following message. I suppose I need it to install via brew tool? But what's the package name I need to install if so?

.../nanovg/src/nanovg_gl.h:287:3: Use of undeclared identifier 'glBindTexture'
.../nanovg/src/nanovg_gl.h:299:3: Use of undeclared identifier 'glStencilMask'
.../nanovg/src/nanovg_gl.h:316:3: Use of undeclared identifier 'glStencilFunc'
.../nanovg/src/nanovg_gl.h:367:5: Use of undeclared identifier 'glDeleteTextures'
.../nanovg/src/nanovg_gl.h:379:2: Use of undeclared identifier 'glGetShaderInfoLog'
.../nanovg/src/nanovg_gl.h:389:2: Use of undeclared identifier 'glGetProgramInfoLog'
.../nanovg/src/nanovg_gl.h:399:8: Use of undeclared identifier 'glGetError'
.../nanovg/src/nanovg_gl.h:416:9: Use of undeclared identifier 'glCreateProgram'
.../nanovg/src/nanovg_gl.h:417:9: Use of undeclared identifier 'glCreateShader'
.../nanovg/src/nanovg_gl.h:418:9: Use of undeclared identifier 'glCreateShader'
.../nanovg/src/nanovg_gl.h:420:2: Use of undeclared identifier 'glShaderSource'
.../nanovg/src/nanovg_gl.h:422:2: Use of undeclared identifier 'glShaderSource'
.../nanovg/src/nanovg_gl.h:424:2: Use of undeclared identifier 'glCompileShader'
.../nanovg/src/nanovg_gl.h:425:2: Use of undeclared identifier 'glGetShaderiv'
.../nanovg/src/nanovg_gl.h:431:2: Use of undeclared identifier 'glCompileShader'
.../nanovg/src/nanovg_gl.h:432:2: Use of undeclared identifier 'glGetShaderiv'
.../nanovg/src/nanovg_gl.h:438:2: Use of undeclared identifier 'glAttachShader'
.../nanovg/src/nanovg_gl.h:439:2: Use of undeclared identifier 'glAttachShader'
.../nanovg/src/nanovg_gl.h:441:2: Use of undeclared identifier 'glBindAttribLocation'
 

teagls

macrumors regular
May 16, 2013
202
101
Is nanovg_gl.h a header file you wrote? You need to include the headers for OpenGL from the framework itself. So something like #import <OpenGL/gl.h>
 

teagls

macrumors regular
May 16, 2013
202
101
Actually NanoVG (git: https://github.com/memononen/nanovg) is not my project I'm just trying to compile it. I try to include some GL header but my attempt was not successfully: main.cpp:15:10: 'OpenGLES/ES2/gl.h' file not found

The mac version of OpenGL does not have OpenGL ES. That is specific for iOS. The ES stands for embedded systems. The mac OpenGL is something like <OpenGL/gl.h> for fixed function pipeline or <OpenGL/gl3.h> for higher versions.
 
  • Like
Reactions: Madd the Sane
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.