Вопрос

I have to implement VBOs in a very old OpenGL program made in Broldand 5.02, but im getting the folowing error when i try to include GL/glew.h :

Info :Compiling C:\fontesusr\vertexbuffer.cpp
Error:  glew.h(269,25):Too many types in declaration
Error:  glew.h(270,27):Too many types in declaration
Error:  glew.h(13275,185):Multiple declaration for 'PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3F'
Error:  glew.h(13274,185):Earlier declaration of 'PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3F'

the problem appear in the folowing glew code:

#elif defined(_MSC_VER) || defined(__BORLANDC__)
    typedef signed long long GLint64EXT;
    typedef unsigned long long GLuint64EXT;
#else

i think that happens because borland 5.02 is a 32bit compiler...

Someone can give me a suggest on what can i do to solve this problem? or another way to implement VBOs without make use of glew libraries?

Это было полезно?

Решение

I am 99% sure Borland C++ 5 didn't have a 64-bit bit integer type. It seems to be interpreting long long as "many types" and borking at it.

The version of glew you are using wasn't written to support older versions of Borland C++.

You could attempt to hack the glew header files to remove the references to 64-bit types and functions.

Also this might work but I'm not sure:

#undefine __BORLANDC__
#include <glew.h>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top