[vtk-developers] [VTK 0011742]: 64-bit build fails using MinGW-w64

Mantis Bug Tracker mantis at public.kitware.com
Fri Jan 21 07:31:00 EST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://vtk.org/Bug/view.php?id=11742 
====================================================================== 
Reported By:                Christian Lackas
Assigned To:                
====================================================================== 
Project:                    VTK
Issue ID:                   11742
Category:                   Development
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-01-21 07:30 EST
Last Modified:              2011-01-21 07:31 EST
====================================================================== 
Summary:                    64-bit build fails using MinGW-w64
Description: 
When trying to build VTK (SVN trunk) on Windows 7 using MinGW-w64 (gcc/g++ 4.4.5
20100604) I run into a number of issues, namely:

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
   choice 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 (just defining the symbols on my own).
4) Overwriting _WIN32_WINNT caused problems, just removed that.
5) Removed an apparently obsolete typedef for 'signed char' that lead to
   a redefined error.

Steps to Reproduce: 
I had build VTK with these options when I ran into above problems:

cmake 		-DDESIRED_QT_VERSION=4
		-DVTK_USE_GUISUPPORT=on
		-DVTK_USE_QT=on
		-DVTK_USE_QVTK=on
		-DVTK_QT_MOC_EXECUTABLE=moc
		-DVTK_QT_QMAKE_EXECUTABLE=qmake
		-DVTK_QT_UIC_EXECUTABLE=uic
		-DBUILD_EXAMPLES=off
   -G "MSYS Makefiles" ..

Additional Information: 
Rough patch (for 2 and 3 I just cure the symptoms not the cause) which allows
successful build attached.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-21 07:30 Christian LackasNew Issue                                    
2011-01-21 07:31 Christian LackasFile Added: vtk-msys-mingw64.patch             
      
======================================================================




More information about the vtk-developers mailing list