MathewWi / freetype-gl

Automatically exported from code.google.com/p/freetype-gl
Other
0 stars 0 forks source link

incompatibility with new glext.h #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
it seems the use of a function named GL_TYPE() clashes with new glext.h headers 
that define this as a macro.

i'm using an old snapshot but inspecting trunk leads to the suspicion this is a 
problem there as well.

this is the error that was forwarded to me:

Compiling file sources/freetype-gl/texture-atlas.c ...
Compiling file sources/freetype-gl/texture-font.c ...
Compiling file sources/freetype-gl/vector.c ...
Compiling file sources/freetype-gl/vertex-buffer.c ...
In file included from sources/freetype-gl/vertex-buffer.c:38:
sources/freetype-gl//vertex-buffer.h:442:3: error: 
expected identifier or '('
GL_TYPE( char ctype );
^
/usr/include/GL/glext.h:2972:43: note: expanded from:
#define GL_TYPE 0x92FA
^
sources/freetype-gl/vertex-buffer.c:592:34: error: 
called object type 'int' is not a function or function pointer
GLenum type = GL_TYPE( ctype );
~~~~~~~^
sources/freetype-gl/vertex-buffer.c:600:34: error: 
called object type 'int' is not a function or function pointer
GLenum type = GL_TYPE( ctype );
~~~~~~~^
sources/freetype-gl/vertex-buffer.c:612:30: error: 
called object type 'int' is not a function or function pointer
GLenum type = GL_TYPE( ctype );
~~~~~~~^
sources/freetype-gl/vertex-buffer.c:586:31: warning: 
array index of '2' indexes past the end of an array (that contains 2
elements) [-Warray-bounds]
p = strpbrk ( format, "n" );
~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/x86_64-linux-gnu/bits/string2.h:1097:39: note: expanded from:
: ((__a2 = ((__const char ) (accept))[2], a2 == '\0') \
^ ~
sources/freetype-gl/vertex-buffer.c:586:31: warning: 
array index of '3' indexes past the end of an array (that contains 2
elements) [-Warray-bounds]
p = strpbrk ( format, "n" );
~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/x86_64-linux-gnu/bits/string2.h:1099:27: note: expanded from:
: (((const char *) (accept))[3] == '\0' \
^ ~
sources/freetype-gl/vertex-buffer.c:745:1: error: 
expected identifier or '('
GL_TYPE( char ctype )
^
/usr/include/GL/glext.h:2972:43: note: expanded from:
#define GL_TYPE 0x92FA
^
2 warnings and 5 errors generated.
make[3]: ** [obj/sources/freetype-gl/vertex-buffer.c.o] Error 1

Original issue reported on code.google.com by mayer.ju...@gmail.com on 30 Nov 2012 at 7:12

GoogleCodeExporter commented 9 years ago
Thanks for the report.

I just removed all GL_*_TYPE functions since they were used at one place only.

Original comment by Nicolas.Rougier@gmail.com on 16 Dec 2012 at 8:59