VTK 6.2.0: MinGW64 compilation bug on Windows7 error in vtkWin32VideoSource::Initialize() call
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
With the new version 6.2.0, I encounter a compilation bug with MinGW 64 bits G++ 4.9.2 in method Initialize of class vtkWin32VideoSource
Here is the compilation error
[ 92%] Building CXX object IO/Video/CMakeFiles/vtkIOVideo.dir/vtkWin32VideoSource.cxx.obj In file included from d:/VTK-6.2.0/IO/Video/vtkWin32VideoSource.cxx:31:0: d:/VTK-6.2.0/IO/Video/vtkWin32VideoSource.cxx: In member function 'virtual void vtkWin32VideoSource::Initialize()': d:/VTK-6.2.0/IO/Video/vtkWin32VideoSource.cxx:352:52: error: cast from 'vtkWin32VideoSource*' to 'long int' loses precision [-fpermissive] if (!capSetUserData(this->Internal->CapWnd,(long)this)) ^ make[2]: *** [IO/Video/CMakeFiles/vtkIOVideo.dir/vtkWin32VideoSource.cxx.obj] Error 1 make[1]: *** [IO/Video/CMakeFiles/vtkIOVideo.dir/all] Error 2 make: *** [all] Error 2
I fixed it by removing the cast
- if (!capSetUserData(this->Internal->CapWnd,(long)this))
- if (!capSetUserData(this->Internal->CapWnd,this))
This is similar to bug #14292 (closed)