Thank you Christian for your patch. Do you mind submitting a bug on <a href="http://vtk.org/Bug">vtk.org/Bug</a> 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!<br>
<br><div class="gmail_quote">On Fri, Jan 21, 2011 at 4:52 AM, Christian Lackas <span dir="ltr"><<a href="mailto:lackas@invicro.com">lackas@invicro.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Everybody,<br>
<br>
yesterday I tried to build VTK on Windows-7 64-bit, using MinGW-w64[1]<br>
and ran into a couple of issues. In case this is some help for anybody,<br>
you can find a patch (against SVN trunk as of yesterday) here:<br>
<br>
<a href="http://www.invicro.com/vtk/vtk-msys-mingw64.patch" target="_blank">http://www.invicro.com/vtk/vtk-msys-mingw64.patch</a><br>
<br>
The problems I had to fix where:<br>
1) Quite a few places where pointers are converted to integers to be<br>
used as ids, which on a 64-bit system failed due to loss of precision<br>
when casting pointers to e.g. long.<br>
I replaced the casts to intptr_t, which seems to be the natural<br>
type for this operation (and should be available on all C99/C++0X<br>
compatible compilers).<br>
2) On MinGW-w64 one cannot use __int64 type together with long long,<br>
something that apparently was addressed in CMake/vtkTestTypes.cmake<br>
(according to the svn history), however, the ruleset there still did<br>
not work for me and I has to force VTK_TYPE_USE___INT64 to 0.<br>
3) Two Windows symbols (GWL_WNDPROC and HWL_HINSTANCE) were not defined<br>
for unknown reasons. Since I don't fully understand vtk's mechanism<br>
of not including windows.h when building vtk itself, I just used a<br>
big hammer.<br>
4) Overwriting _WIN32_WINNT caused problems, just removed that.<br>
5) Removed an apparently obsolete typedef for 'signed char' that lead to<br>
a redefined error.<br>
<br>
After applying above patch, I could successfully compile a 64-bit build<br>
of VTK using g++ 4.4.5 (20100604) under MSYS.<br>
<br>
[1] <a href="http://mingw-w64.sourceforge.net/" target="_blank">http://mingw-w64.sourceforge.net/</a><br>
<br>
Hope this is useful to anyone,<br>
Christian<br>
<br>
--<br>
Dr. Christian Lackas, Managing Partner<br>
inviCRO, LLC -- In Imaging Yours<br>
P: +1 617 963 0263, F: +49 2203 9034722, E: <a href="mailto:lackas@invicro.com">lackas@invicro.com</a><br>
<a href="http://www.invicro.com/" target="_blank">http://www.invicro.com/</a> <a href="http://www.spect-ct.com/" target="_blank">http://www.spect-ct.com/</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>