[vtkusers] Fix Ubuntu 14.04 VTK 6.1 compiling issue
Christian Askeland
christian.askeland at gmail.com
Tue Sep 2 05:05:29 EDT 2014
Hi,
I had the same issue today, on both VTK 6.1 and the current git HEAD. I use
the NVidia driver version 343 (gl headers dated august 2014). However, a
colleague of mine compiles VTK fine when using an older driver (331 /
january 2014).
I looked into the GL headers (/usr/include/GL/) and found that GLintptr now
is in use in glxext.h, this was not the case in the previous version.
My solution was to uncomment the define GLXEXT like this:
// define GLX_GLXEXT_LEGACY to prevent glx.h to include glxext.h provided by
// the system
#define GLX_GLXEXT_LEGACY
#include "GL/glx.h"
#include "vtkgl.h"
in file
vtkXOpenGLRenderWindow.cpp
which causes glext.h to be included in glxext.h, thus providing the missing
type GLintptr.
This seems like a better solution than including vtkgl.h before GL/glx.h,
but I don't have the full picture here.
Best Regards
Christian Askeland
SINTEF Medical Technology
On Fri, Aug 29, 2014 at 9:49 AM, Severin Holzer-Graf <sholzergr at gmail.com>
wrote:
> Hi,
>
> I faced the same compiling issue on Ubuntu 14.04 as mathew here:
> http://www.vtk.org/pipermail/vtkusers/2014-August/084877.html
> Compiling fails, because "GLsizeiptr has not been declared".
>
> The issue is that "vtkgl.h" is included *after* "GL/glx.h" which needs
> the typedefs for the datatypes from "vtkgl.h".
> I simply swapped the two lines and VTK compiles. Appended a patch that
> shows the change.
>
> Interestingly on my ArchLinux system compiling VTK 6.1 works out of
> the box and this was not necessary. I didn't further investigate that,
> so I'm not sure if swapping the two lines is actually the correct fix.
>
> Best
> Severin
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140902/1cd2bcc7/attachment.html>
More information about the vtkusers
mailing list