The SDL forums have moved to
This is just a read-only archive of the previous forums, to keep old links working.

SDL Forum Index
Simple Directmedia Layer Forums
warning: 'GLAPI' macro redefined

Joined: 07 Feb 2017
Posts: 2
If I include SDL_Opengl.h after including GL/glcorearb.h I get this compiler warning:

/home/bram/sdl205/include/SDL2/SDL_opengl.h:101:11: warning: 'GLAPI' macro redefined [-Wmacro-redefined]
#  define GLAPI __attribute__((visibility("default")))
/usr/include/GL/glcorearb.h:53:9: note: previous definition is here
#define GLAPI extern

This is with SDL 2.05 on Ubuntu 16.04.1, clang 3.8.0

Maybe the SDL_opengl.h header requires a #ifndef GLAPI guard?