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

Paulo Carvalho paulo.r.m.carvalho at gmail.com
Fri Nov 9 13:12:01 EST 2018


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


More information about the vtkusers mailing list