[vtkusers] Error building VTK 64-bit

David Gobbi david.gobbi at gmail.com
Fri Apr 22 20:47:03 EDT 2011


On Fri, Apr 22, 2011 at 5:28 PM, Gib Bogle <g.bogle at auckland.ac.nz> wrote:

> Hi David,
>
> That change (just one occurrence) fixed that compile, but later I get:
>
> [ 67%] Building CXX object
> Rendering/CMakeFiles/vtkRendering.dir/vtkWin32OpenGLR
> enderWindow.cxx.obj
> C:\VTK-src\Rendering\vtkWin32OpenGLRenderWindow.cxx: In member function
> 'void vt
> kWin32OpenGLRenderWindow::InitializeApplication()':
> C:\VTK-src\Rendering\vtkWin32OpenGLRenderWindow.cxx:719:78: error:
> 'GWL_HINSTANC
> E' was not declared in this scope
> C:\VTK-src\Rendering\vtkWin32OpenGLRenderWindow.cxx: In member function
> 'virtual
>  void vtkWin32OpenGLRenderWindow::CreateAWindow()':
> C:\VTK-src\Rendering\vtkWin32OpenGLRenderWindow.cxx:846:64: error: cast
> from 'vt
> kWin32OpenGLRenderWindow*' to 'LONG' loses precision
> mingw32-make[2]: ***
> [Rendering/CMakeFiles/vtkRendering.dir/vtkWin32OpenGLRender
> Window.cxx.obj] Error 1
>
> mingw32-make[1]: *** [Rendering/CMakeFiles/vtkRendering.dir/all] Error 2
> mingw32-make: *** [all] Error 2
>
> What are the common ways to build 64-bit VTK?
>

The most common way is Microsoft Visual C++.

However, these errors you are getting with MinGW-w64 look like they are
fairly minor.
The new errors can be fixed by editing Common/vtkWin32Header.cxx and
replacing
#if ( _MSC_VER >= 1300 )   with  #if 1

You'll probably run into more errors after that, but I'd bet they are
equally straightforward
to fix.  I'm guessing that you shouldn't have much trouble getting
everything to compile.

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110422/a6f5af7a/attachment.htm>


More information about the vtkusers mailing list