mdelfede Messages: 1307 Registered: September 2007
Ultimate Contributor
Mirek, here the compilation error :
In file included from /usr/include/GL/glx.h:336,
from /home/massimo/sources/upp-svn/uppsrc/GLCtrl/GLCtrl.h:12,
from /home/massimo/sources/upp-svn/MyApps/TestGL/TestOpenGL.cpp:1:
/usr/include/GL/glxext.h:714: error: typedef ‘Upp::Status’ is initialized (use decltype instead)
/usr/include/GL/glxext.h:714: error: ‘PFNGLXGETTRANSPARENTINDEXSUNPROC’ was not declared in this scope
The glext.h is included AFTER upp namespace opening because of your defines in X11 stuffs :
If I include after I have tons of errors.
Now, with the #define we spoke about :
#ifdef PLATFORM_X11
#define Status GLStatus
#include <GL/glx.h>
#undef Status
#endif
the error is almost the same :
In file included from /usr/include/GL/glx.h:336,
from /home/massimo/sources/upp-svn/uppsrc/GLCtrl/GLCtrl.h:13,
from /home/massimo/sources/upp-svn/uppsrc/GLCtrl/GLPicking.cpp:1,
from /home/massimo/sources/upp-svn/out/GLCtrl/GCC.Debug.Debug_full.Gui.Shared/$blitz.cpp:3:
/usr/include/GL/glxext.h:714: error: typedef ‘Upp::GLStatus’ is initialized (use decltype instead)
/usr/include/GL/glxext.h:714: error: ‘PFNGLXGETTRANSPARENTINDEXSUNPROC’ was not declared in this scope
The best would be of course include glext BEFORE upp namespace :
#ifdef PLATFORM_X11
#define Status GLStatus
#include <GL/glx.h>
#undef Status
#endif
NAMESPACE_UPP
But then I get tons of errors because of your #defines in X11 core. If I replicate all those defines :
#ifdef PLATFORM_X11
#define Time XTime
#define Font XFont
#define Display XDisplay
#define Picture XPicture
#define Status GLStatus
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
#undef Status
#undef Picture
#undef Time
#undef Font
#undef Display
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif
I get tons of errors, AND the same error as before at end.