Compile Qt4.7.1 for QNX and OpenGL ES2



  • Hello everybody,

    I would like to use Qt on QNX Neutrio 6.5. I found a porting of Qt for Qnx on this page : http://community.qnx.com/sf/wiki/do/viewPage/projects.qt/wiki/Downloads.

    The way to compile the source is by using their script : qnx-build.
    I saw that in this script the didn't enabled the OpenGL. I tried to enable it but I have many issues during the compilation. I fixed some of them and I am stucked at this error :

    When I compile QtGui or QtOpenGL I have re-declaration issue in the headers and missing some defines :

    @~/dev/qt-qnx-4.7.1/src/opengl$ colormake
    ntoarmv7-g++ -c -pipe -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_OPENGL_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQT_NO_FREETYPE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/unsupported/qws/qnx-armv7-g++ -I. -I../../include/QtCore -I../../include/QtGui -I../../include -I../../include/QtOpenGL -I.rcc/release-shared-emb-armv6 -I../3rdparty/harfbuzz/src -I.moc/release-shared-emb-armv6 -I/opt/qnx650/target/qnx6/usr/include -o .obj/release-shared-emb-armv6/qgl.o qgl.cpp
    In file included from /opt/qnx650/target/qnx6//usr/include/GLES/egl.h:4,
    from ../../include/QtGui/private/../../../src/gui/egl/qegl_p.h:64,
    from ../../include/QtGui/private/qegl_p.h:1,
    from qgl_p.h:68,
    from qgl.cpp:68:
    /opt/qnx650/target/qnx6//usr/include/GLES/gl.h:729: error: declaration of C function 'void glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)' conflicts with
    /opt/qnx650/target/qnx6//usr/include/GLES2/gl2.h:578: error: previous declaration 'void glTexImage2D(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, const void*)' here
    In file included from qgl.cpp:83:
    ./qglframebufferobject.h:71: error: 'GL_RGBA8' was not declared in this scope
    ./qglframebufferobject.h:73: error: 'GL_RGBA8' was not declared in this scope
    qgl.cpp: In member function 'int QGLContextPrivate::maxTextureSize()':
    qgl.cpp:2641: error: 'GL_PROXY_TEXTURE_2D' was not declared in this scope
    qgl.cpp:2646: error: 'GL_TEXTURE_WIDTH' was not declared in this scope
    qgl.cpp:2646: error: 'glGetTexLevelParameteriv' was not declared in this scope
    qgl.cpp: In member function 'void QGLContext::drawTexture(const QPointF&, GLuint, GLenum)':
    qgl.cpp:3022: error: 'GL_TEXTURE_WIDTH' was not declared in this scope
    qgl.cpp:3022: error: 'glGetTexLevelParameteriv' was not declared in this scope
    qgl.cpp:3023: error: 'GL_TEXTURE_HEIGHT' was not declared in this scope
    qgl.cpp:3037: error: 'qDrawTextureRect' was not declared in this scope
    qgl.cpp: In member function 'virtual void QGLWidget::glDraw()':
    qgl.cpp:4453: error: 'glDrawBuffer' was not declared in this scope
    qgl.cpp: In member function 'void QGLWidget::qglClearColor(const QColor&) const':
    qgl.cpp:4525: error: 'glClearIndex' was not declared in this scope
    qgl.cpp:4527: error: 'glClearIndex' was not declared in this scope
    qgl.cpp: In function 'void qt_save_gl_state()':
    qgl.cpp:4671: error: 'GL_CLIENT_ALL_ATTRIB_BITS' was not declared in this scope
    qgl.cpp:4671: error: 'glPushClientAttrib' was not declared in this scope
    qgl.cpp:4672: error: 'GL_ALL_ATTRIB_BITS' was not declared in this scope
    qgl.cpp:4672: error: 'glPushAttrib' was not declared in this scope
    qgl.cpp: In function 'void qt_restore_gl_state()':
    qgl.cpp:4698: error: 'glPopAttrib' was not declared in this scope
    qgl.cpp:4699: error: 'glPopClientAttrib' was not declared in this scope
    qgl.cpp: In member function 'void QGLWidget::renderText(int, int, const QString&, const QFont&, int)':
    qgl.cpp:4791: error: 'glOrtho' was not declared in this scope
    qgl.cpp: In member function 'void QGLWidget::renderText(double, double, double, const QString&, const QFont&, int)':
    qgl.cpp:4863: error: 'glGetDoublev' was not declared in this scope
    qgl.cpp:4909: error: 'glOrtho' was not declared in this scope
    qgl.cpp:4916: error: 'glTranslated' was not declared in this scope
    make: *** [.obj/release-shared-emb-armv6/qgl.o] Error 1
    @

    I don't know how to solve this issue. If someone could compile the package, it would be nice to share with me the libs (armv7).

    Thanks.
    Baris



  • Baris,

    I succeeded in building the qt4.7.1 for QNX6.5. I must modified opengl option in qnx-build script to support OpenGLESv2.
    You can contact me if you still need the libs (armv7)
    My email is: anluuvn@gmail.com


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.