GLAPI conflict between epoxy/gl.h and gdkmm/glcontext.h
There's a definition conflict for GLAPI
occurring in typical usage:
-
Epoxy defines
GLAPI
as a macro, inepoxy/gl.h
:#ifndef _WIN32 /* APIENTRY and GLAPIENTRY are not used on Linux or Mac. */ #define APIENTRY #define GLAPIENTRY #define EPOXY_CALLSPEC #define GLAPI // <--- #define KHRONOS_APIENTRY #define KHRONOS_APICALL
-
GTKmm defines
GLAPI
as an enum class, ingdkmm/glcontext.h
:enum class GLAPI // <--- { GL = 1 << 0, GLES = 1 << 1 }; /** @ingroup gdkmmEnums */ inline GLAPI operator|(GLAPI lhs, GLAPI rhs)
So if you include epoxy first, the code won't compile, and if you include gtkmm first, you can't use the enum class.
What is the API user supposed to do in this situation?
Version info
epoxy: 1.5.9
gtkmm-4.0: 4.6.0