Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Get errors about redefinition (OpenGL 4.0 Shading Language Cookbook)

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    4

    Unhappy Get errors about redefinition (OpenGL 4.0 Shading Language Cookbook)

    Hi, I have just started learning GLSL,

    I just tested the code in chapter 1 (OpenGL 4.0 Shading Language Cookbook) (code download)

    I have installed Qt5, qmake -tp vc chapter01.pro then open it in vs2010.

    Built and got many errors like:

    Code :
    1>D:\APP\Qt5\5.0.0\msvc2010\include\GLES2/gl2.h(38): error C2371: 'GLintptr' : redefinition; different basic types
    1>          D:\OpenGL\glew-1.5.4\include\GL/glew.h(1615) : see declaration of 'GLintptr'
    1>D:\APP\Qt5\5.0.0\msvc2010\include\GLES2/gl2.h(39): error C2371: 'GLsizeiptr' : redefinition; different basic types
    1>          D:\OpenGL\glew-1.5.4\include\GL/glew.h(1614) : see declaration of 'GLsizeiptr'
    1>D:\APP\Qt5\5.0.0\msvc2010\include\GLES2/gl2.h(96): warning C4005: 'GL_BLEND_EQUATION_RGB' : macro redefinition
    1>          D:\OpenGL\glew-1.5.4\include\GL/glew.h(1666) : see previous definition of 'GL_BLEND_EQUATION_RGB'
    1>D:\APP\Qt5\5.0.0\msvc2010\include\GLES2/gl2.h(474): error C2365: '__glewActiveTexture' : redefinition; previous definition was 'data variable'
    1>          D:\OpenGL\glew-1.5.4\include\GL/glew.h(12027) : see declaration of '__glewActiveTexture'
    1>D:\APP\Qt5\5.0.0\msvc2010\include\GLES2/gl2.h(475): error C2365: '__glewAttachShader' : redefinition; previous definition was 'data variable'

    How to solve these problems?

    Thanks in advance.
    Last edited by superwavelet; 02-06-2013 at 06:25 PM.

  2. #2
    Junior Member Newbie
    Join Date
    Jan 2013
    Posts
    4
    First, I didn't explicitly include gl2.h in this project. Second, I commented out all OpenGL headers and these errors still exist. Why?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •