Error while compiling

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error while compiling

Guillermo Polito
When I compile the last version of the Vm in my 32bit ubuntu, I get the following:

In file included from /home/guille/Dev/Pharo/cogvm/coglinux/blessed/platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c:30:0:
/home/guille/Dev/Pharo/cogvm/coglinux/blessed/platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.h:13:16: error: redefinition of ‘struct glRenderer’
/home/guille/Dev/Pharo/cogvm/coglinux/blessed/platforms/unix/plugins/B3DAcceleratorPlugin/sqUnixOpenGL.h:6:16: note: originally defined here


Diving into the code, I found that in sqUnixOpenGL.h there is code like:

...

typedef struct glRenderer
{
  int      bufferRect[4];
  int      viewport[4];
  int      used;
  void     *drawable;
  void     *context;
} glRenderer;

#if defined(USE_X11_GLX) || defined (USE_QUARTZ_CGL)

# define GL_RENDERER_DEFINED     1
# define MAX_RENDERER        16

# if defined(HAVE_GL_GL_H)
#   include <GL/gl.h>
# else
#   if defined(HAVE_OPENGL_GL_H)
#     include <OpenGL/gl.h>
#   else
#     error *** cannot find gl.h
#   endif
# endif

#endif

...

Shouldn't the typedef be written inside the #if and #endif?
If so, how do I publish the fix?

Cheers,
Guille

_______________________________________________
VM-beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners
Reply | Threaded
Open this post in threaded view
|

Re: Error while compiling

Guillermo Polito
BTW, what more annoys me is that I generated the sources with CogUnixNoGLConfig, hehe

Guille

On Thu, Jan 12, 2012 at 6:25 PM, Guillermo Polito <[hidden email]> wrote:
When I compile the last version of the Vm in my 32bit ubuntu, I get the following:

In file included from /home/guille/Dev/Pharo/cogvm/coglinux/blessed/platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c:30:0:
/home/guille/Dev/Pharo/cogvm/coglinux/blessed/platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.h:13:16: error: redefinition of ‘struct glRenderer’
/home/guille/Dev/Pharo/cogvm/coglinux/blessed/platforms/unix/plugins/B3DAcceleratorPlugin/sqUnixOpenGL.h:6:16: note: originally defined here


Diving into the code, I found that in sqUnixOpenGL.h there is code like:

...

typedef struct glRenderer
{
  int      bufferRect[4];
  int      viewport[4];
  int      used;
  void     *drawable;
  void     *context;
} glRenderer;

#if defined(USE_X11_GLX) || defined (USE_QUARTZ_CGL)

# define GL_RENDERER_DEFINED     1
# define MAX_RENDERER        16

# if defined(HAVE_GL_GL_H)
#   include <GL/gl.h>
# else
#   if defined(HAVE_OPENGL_GL_H)
#     include <OpenGL/gl.h>
#   else
#     error *** cannot find gl.h
#   endif
# endif

#endif

...

Shouldn't the typedef be written inside the #if and #endif?
If so, how do I publish the fix?

Cheers,
Guille


_______________________________________________
VM-beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners
Reply | Threaded
Open this post in threaded view
|

Re: Error while compiling

Guillermo Polito
Compiling with CogUnixConfig works... are the class names ok? Or Maybe the No in the NoGL means something different, hehe.

Thanks,
Guille

On Thu, Jan 12, 2012 at 6:37 PM, Guillermo Polito <[hidden email]> wrote:
BTW, what more annoys me is that I generated the sources with CogUnixNoGLConfig, hehe

Guille


On Thu, Jan 12, 2012 at 6:25 PM, Guillermo Polito <[hidden email]> wrote:
When I compile the last version of the Vm in my 32bit ubuntu, I get the following:

In file included from /home/guille/Dev/Pharo/cogvm/coglinux/blessed/platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c:30:0:
/home/guille/Dev/Pharo/cogvm/coglinux/blessed/platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.h:13:16: error: redefinition of ‘struct glRenderer’
/home/guille/Dev/Pharo/cogvm/coglinux/blessed/platforms/unix/plugins/B3DAcceleratorPlugin/sqUnixOpenGL.h:6:16: note: originally defined here


Diving into the code, I found that in sqUnixOpenGL.h there is code like:

...

typedef struct glRenderer
{
  int      bufferRect[4];
  int      viewport[4];
  int      used;
  void     *drawable;
  void     *context;
} glRenderer;

#if defined(USE_X11_GLX) || defined (USE_QUARTZ_CGL)

# define GL_RENDERER_DEFINED     1
# define MAX_RENDERER        16

# if defined(HAVE_GL_GL_H)
#   include <GL/gl.h>
# else
#   if defined(HAVE_OPENGL_GL_H)
#     include <OpenGL/gl.h>
#   else
#     error *** cannot find gl.h
#   endif
# endif

#endif

...

Shouldn't the typedef be written inside the #if and #endif?
If so, how do I publish the fix?

Cheers,
Guille



_______________________________________________
VM-beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners