[vtkusers] Issue compiling VTK 8.1.2 - MinGW64 - Windows 7

Paulo Carvalho paulo.r.m.carvalho at gmail.com
Mon Dec 10 04:50:06 EST 2018


Greetings, all,

    Since I got no answer, I had to do come up with a workaround.  I had to
patch the <source
root>/Rendering/OpenGL2/vtkWin32RenderWindowInteractor.cxx file (around
line 70).  The structures TOUCHINPUT and HTOUCHINPUT are incorrectly
redefined there (they're defined in winuser.h).  Since this is an error in
VTK sources, maybe the developers could patch it.
    Compiling VTK 8.1.2 in Windows 7 64 with MinGW 64.

regards,

Paulo

Em sex, 9 de nov de 2018 às 16:12, Paulo Carvalho <
paulo.r.m.carvalho at gmail.com> escreveu:

> Greetings all.  I'm trying to build VTK and I'm getting the following
> error:
>
> [ 62%] Building CXX object
>
> Rendering/OpenGL2/CMakeFiles/vtkRenderingOpenGL2.dir/vtkWin32RenderWindowInteractor.cxx.obj
>
> C:\Users\ur5m\Desktop\VTK64\VTK-8.1.2\Rendering\OpenGL2\vtkWin32RenderWindowInteractor.cxx:72:3:
> error: conflicting declaration 'typedef struct _TOUCHINPUT TOUCHINPUT'
>  } TOUCHINPUT, *PTOUCHINPUT;
>    ^~~~~~~~~~
> In file included from
>
> C:/Users/ur5m/Desktop/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:72,
>                  from
> C:/Users/ur5m/Desktop/VTK64/VTK-8.1.2/Common/Core/vtkWindows.h:58,
>                  from
>
> C:\Users\ur5m\Desktop\VTK64\VTK-8.1.2\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.h:31,
>                  from
>
> C:\Users\ur5m\Desktop\VTK64\VTK-8.1.2\Rendering\OpenGL2\vtkWin32RenderWindowInteractor.cxx:26:
>
> C:/Users/ur5m/Desktop/msys64/mingw64/x86_64-w64-mingw32/include/winuser.h:2694:5:
> note: previous declaration as 'typedef struct tagTOUCHINPUT TOUCHINPUT'
>    } TOUCHINPUT,*PTOUCHINPUT;
>      ^~~~~~~~~~
>
> C:\Users\ur5m\Desktop\VTK64\VTK-8.1.2\Rendering\OpenGL2\vtkWin32RenderWindowInteractor.cxx:72:16:
> error: conflicting declaration 'typedef struct _TOUCHINPUT* PTOUCHINPUT'
>  } TOUCHINPUT, *PTOUCHINPUT;
>                 ^~~~~~~~~~~
> In file included from
>
> C:/Users/ur5m/Desktop/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:72,
>                  from
> C:/Users/ur5m/Desktop/VTK64/VTK-8.1.2/Common/Core/vtkWindows.h:58,
>                  from
>
> C:\Users\ur5m\Desktop\VTK64\VTK-8.1.2\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.h:31,
>                  from
>
> C:\Users\ur5m\Desktop\VTK64\VTK-8.1.2\Rendering\OpenGL2\vtkWin32RenderWindowInteractor.cxx:26:
>
> C:/Users/ur5m/Desktop/msys64/mingw64/x86_64-w64-mingw32/include/winuser.h:2694:17:
> note: previous declaration as 'typedef struct tagTOUCHINPUT* PTOUCHINPUT'
>    } TOUCHINPUT,*PTOUCHINPUT;
>                  ^~~~~~~~~~~
> In file included from
>
> C:/Users/ur5m/Desktop/msys64/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
>                  from
> C:/Users/ur5m/Desktop/msys64/mingw64/x86_64-w64-mingw32/include/windef.h:8,
>                  from
>
> C:/Users/ur5m/Desktop/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:69,
>                  from
> C:/Users/ur5m/Desktop/VTK64/VTK-8.1.2/Common/Core/vtkWindows.h:58,
>                  from
>
> C:\Users\ur5m\Desktop\VTK64\VTK-8.1.2\Rendering\OpenGL2\vtkWin32OpenGLRenderWindow.h:31,
>                  from
>
> C:\Users\ur5m\Desktop\VTK64\VTK-8.1.2\Rendering\OpenGL2\vtkWin32RenderWindowInteractor.cxx:26:
>
> C:\Users\ur5m\Desktop\VTK64\VTK-8.1.2\Rendering\OpenGL2\vtkWin32RenderWindowInteractor.cxx:73:16:
> error: redefinition of 'struct HTOUCHINPUT__'
>  DECLARE_HANDLE(HTOUCHINPUT);
>                 ^~~~~~~~~~~
>
> C:/Users/ur5m/Desktop/msys64/mingw64/x86_64-w64-mingw32/include/winuser.h:2681:3:
> note: previous definition of 'struct HTOUCHINPUT__'
>    DECLARE_HANDLE (HTOUCHINPUT);
>    ^~~~~~~~~~~~~~
>
> C:\Users\ur5m\Desktop\VTK64\VTK-8.1.2\Rendering\OpenGL2\vtkWin32RenderWindowInteractor.cxx:
> In member function 'virtual int
> vtkWin32RenderWindowInteractor::OnTouch(HWND, UINT, UINT)':
>
> C:\Users\ur5m\Desktop\VTK64\VTK-8.1.2\Rendering\OpenGL2\vtkWin32RenderWindowInteractor.cxx:764:27:
> warning: cast to pointer from integer of different size
> [-Wint-to-pointer-cast]
>      if (GTII((HTOUCHINPUT)lParam, cInputs, pInputs, sizeof(TOUCHINPUT)))
>                            ^~~~~~
>
> C:\Users\ur5m\Desktop\VTK64\VTK-8.1.2\Rendering\OpenGL2\vtkWin32RenderWindowInteractor.cxx:819:23:
> warning: cast to pointer from integer of different size
> [-Wint-to-pointer-cast]
>      CTIH((HTOUCHINPUT)lParam);
>                        ^~~~~~
> mingw32-make[2]: ***
> [Rendering\OpenGL2\CMakeFiles\vtkRenderingOpenGL2.dir\build.make:1733:
>
> Rendering/OpenGL2/CMakeFiles/vtkRenderingOpenGL2.dir/vtkWin32RenderWindowInteractor.cxx.obj]
> Error 1
> mingw32-make[1]: *** [CMakeFiles\Makefile2:2510:
> Rendering/OpenGL2/CMakeFiles/vtkRenderingOpenGL2.dir/all] Error 2
> mingw32-make: *** [Makefile:129: all] Error 2
>
> Any help will be much appreciated.  Thanks.
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181210/de3e3732/attachment.html>


More information about the vtkusers mailing list