VTK failed to build on Windows due to the error C2632: 'int' followed by 'int' is illegal
Hi,
I tried to build VTK with VS2017 update 2 on Windows. It failed due to the error C2632: 'int' followed by 'int' is illegal. Could you please help take a look at this? Thanks!
The repro steps are as follows:
- git clone https://gitlab.kitware.com/vtk/vtk.git D:\VTK\src
- Open a VS 2017 x86 command prompt and browse to D:\VTK
- mkdir build_x86 && pushd build_x86
- cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_VERSION=10.0.15063.0 -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=ON -DBUILD_EXAMPLES=OFF -DVTK_IGNORE_CMAKE_CXX11_CHECKS=TRUE ..\src"
- msbuild /m /p:Configuration=Release;Platform=Win32 All_BUILD.vcxproj /t:Rebuild"
Error info:
(ClCompile target) ->
d:\vtk\src\thirdparty\hdf5\vtkhdf5\src\H5public.h(166): **error C2632: 'int' followed by 'int' is illegal** [D:\VTK\build_x86\ThirdParty\netcdf\vtknetcdf\vtkNetCDF.vcxproj]
d:\vtk\src\thirdparty\hdf5\vtkhdf5\src\H5public.h(166): error C2632: 'int' followed by 'int' is illegal [D:\VTK\build_x86\ThirdParty\netcdf\vtknetcdf\vtkNetCDF.vcxproj]
d:\vtk\src\thirdparty\hdf5\vtkhdf5\src\H5public.h(166): error C2632: 'int' followed by 'int' is illegal [D:\VTK\build_x86\ThirdParty\netcdf\vtknetcdf\vtkNetCDF.vcxproj]
d:\vtk\src\thirdparty\hdf5\vtkhdf5\src\H5public.h(166): error C2632: 'int' followed by 'int' is illegal [D:\VTK\build_x86\ThirdParty\netcdf\vtknetcdf\vtkNetCDF.vcxproj]
d:\vtk\src\thirdparty\hdf5\vtkhdf5\src\H5public.h(166): error C2632: 'int' followed by 'int' is illegal [D:\VTK\build_x86\ThirdParty\netcdf\vtknetcdf\vtkNetCDF.vcxproj]
d:\vtk\src\thirdparty\hdf5\vtkhdf5\src\H5public.h(166): error C2632: 'int' followed by 'int' is illegal [D:\VTK\build_x86\ThirdParty\netcdf\vtknetcdf\vtkNetCDF.vcxproj]
d:\vtk\src\thirdparty\hdf5\vtkhdf5\src\H5public.h(166): error C2632: 'int' followed by 'int' is illegal [D:\VTK\build_x86\ThirdParty\netcdf\vtknetcdf\vtkNetCDF.vcxproj]
d:\vtk\src\thirdparty\hdf5\vtkhdf5\src\H5public.h(166): error C2632: 'int' followed by 'int' is illegal [D:\VTK\build_x86\ThirdParty\netcdf\vtknetcdf\vtkNetCDF.vcxproj]
d:\vtk\src\thirdparty\hdf5\vtkhdf5\src\H5public.h(166): error C2632: 'int' followed by 'int' is illegal [D:\VTK\build_x86\ThirdParty\netcdf\vtknetcdf\vtkNetCDF.vcxproj]
d:\vtk\src\thirdparty\hdf5\vtkhdf5\src\H5public.h(166): error C2632: 'int' followed by 'int' is illegal [D:\VTK\build_x86\ThirdParty\netcdf\vtknetcdf\vtkNetCDF.vcxproj]