Active Topics

 


Reply
Thread Tools
Posts: 3 | Thanked: 0 times | Joined on Feb 2010
#1
I am trying to compile hellogl_es2 example in scratchbox (qt 4.5.3) but it is not working. I am getting the following errors:

Code:
glwidget.cpp: In member function 'void GLWidget::paintQtLogo()':
glwidget.cpp:213: error: 'glVertexAttribPointer' was not declared in this scope
glwidget.cpp:214: error: 'glEnableVertexAttribArray' was not declared in this scope
glwidget.cpp:218: error: 'glDisableVertexAttribArray' was not declared in this scope
glwidget.cpp: In member function 'void GLWidget::paintTexturedCube()':
glwidget.cpp:242: error: 'glVertexAttribPointer' was not declared in this scope
glwidget.cpp:243: error: 'glEnableVertexAttribArray' was not declared in this scope
glwidget.cpp:284: error: 'glUniform1i' was not declared in this scope
glwidget.cpp:288: error: 'glDisableVertexAttribArray' was not declared in this scope
glwidget.cpp: In function 'void reportCompileErrors(GLuint, const char*)':
glwidget.cpp:296: error: 'glGetShaderiv' was not declared in this scope
glwidget.cpp:303: error: 'glGetShaderInfoLog' was not declared in this scope
glwidget.cpp: In function 'void reportLinkErrors(GLuint, const char*, const char*)':
glwidget.cpp:313: error: 'glGetProgramiv' was not declared in this scope
glwidget.cpp:320: error: 'glGetProgramInfoLog' was not declared in this scope
glwidget.cpp: In member function 'virtual void GLWidget::initializeGL()':
glwidget.cpp:337: error: 'glCreateShader' was not declared in this scope
glwidget.cpp:353: error: 'glShaderSource' was not declared in this scope
glwidget.cpp:354: error: 'glCompileShader' was not declared in this scope
glwidget.cpp:369: error: 'glCreateProgram' was not declared in this scope
glwidget.cpp:370: error: 'glAttachShader' was not declared in this scope
glwidget.cpp:372: error: 'glLinkProgram' was not declared in this scope
glwidget.cpp:375: error: 'glGetAttribLocation' was not declared in this scope
glwidget.cpp:377: error: 'glGetUniformLocation' was not declared in this scope
glwidget.cpp: In member function 'virtual void GLWidget::paintGL()':
glwidget.cpp:466: error: 'glUseProgram' was not declared in this scope
glwidget.cpp:467: error: 'glUniformMatrix4fv' was not declared in this scope
glwidget.cpp:471: error: 'glUseProgram' was not declared in this scope
glwidget.cpp:472: error: 'glUniformMatrix4fv' was not declared in this scope
make: *** [glwidget.o] Error 1
What is the problem? The other Qt opengl examples are compiled w/o any problems: hellogl and hellogl_es

the libgles2-dev library is installed. Maybe I am missing something?

Any help is appreciated!
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#2
Hi,

have you added the lib to your *.pro file? You can do it like:

Code:
CONFIG      += link_pkgconfig
PKGCONFIG   += <libname>
Daniel
 
Posts: 3 | Thanked: 0 times | Joined on Feb 2010
#3
I found this page: http://wiki.maemo.org/OpenGL_ES_Libraries. And added the following line to the .pro file: LIBS += -lGLESv2 -lQtOpenGL

But I'm still getting the same result. And it seems that problem is not in the library but in the header -> the compiler can't find declarations of those functions...
 
Reply


 
Forum Jump


All times are GMT. The time now is 05:22.