[vtkusers] Building VTK on 64-bit Windows using MinGW-w64
David Partyka
david.partyka at kitware.com
Fri Jan 21 07:03:54 EST 2011
Thank you Christian for your patch. Do you mind submitting a bug on
vtk.org/Bug for this so it is not forgotten. I'll see if at some point I can
review your patches and setup a 64bit mingw dashboard that build vtk
nightly. Thanks!
On Fri, Jan 21, 2011 at 4:52 AM, Christian Lackas <lackas at invicro.com>wrote:
> Hi Everybody,
>
> yesterday I tried to build VTK on Windows-7 64-bit, using MinGW-w64[1]
> and ran into a couple of issues. In case this is some help for anybody,
> you can find a patch (against SVN trunk as of yesterday) here:
>
> http://www.invicro.com/vtk/vtk-msys-mingw64.patch
>
> The problems I had to fix where:
> 1) Quite a few places where pointers are converted to integers to be
> used as ids, which on a 64-bit system failed due to loss of precision
> when casting pointers to e.g. long.
> I replaced the casts to intptr_t, which seems to be the natural
> type for this operation (and should be available on all C99/C++0X
> compatible compilers).
> 2) On MinGW-w64 one cannot use __int64 type together with long long,
> something that apparently was addressed in CMake/vtkTestTypes.cmake
> (according to the svn history), however, the ruleset there still did
> not work for me and I has to force VTK_TYPE_USE___INT64 to 0.
> 3) Two Windows symbols (GWL_WNDPROC and HWL_HINSTANCE) were not defined
> for unknown reasons. Since I don't fully understand vtk's mechanism
> of not including windows.h when building vtk itself, I just used a
> big hammer.
> 4) Overwriting _WIN32_WINNT caused problems, just removed that.
> 5) Removed an apparently obsolete typedef for 'signed char' that lead to
> a redefined error.
>
> After applying above patch, I could successfully compile a 64-bit build
> of VTK using g++ 4.4.5 (20100604) under MSYS.
>
> [1] http://mingw-w64.sourceforge.net/
>
> Hope this is useful to anyone,
> Christian
>
> --
> Dr. Christian Lackas, Managing Partner
> inviCRO, LLC -- In Imaging Yours
> P: +1 617 963 0263, F: +49 2203 9034722, E: lackas at invicro.com
> http://www.invicro.com/ http://www.spect-ct.com/
> _______________________________________________
> 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://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110121/56f48247/attachment.htm>
More information about the vtkusers
mailing list