<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>VTK Users,<br></div>
<div> </div>
<div>The previous reported fixes apply to both the <span style="line-height: 10.8333330154419px;">VTK 6.2.0 Debug and Release version builds.</span><br></div>
<div> </div>
<div>In building the VTK 6.2.0 Release version, specifically, encountered the following MS VS2015 RTM  compiler bug<br></div>
<div>[previously reported by Yordan Kyosev with no resolution]<br></div>
<div> </div>
<div>Project: <span style="line-height: 10.8333330154419px;">vtkIOEnSight</span><br></div>
<div> </div>
<div>File: <span style="line-height: 10.8333330154419px;">vtkEnSightReader.cxx</span></div>
<div> </div>
<div>1>  vtkEnSightReader.cxx<br></div>
<div>1>  Generating Code...<br></div>
<div>1>e:\vtk\vtk-6.2.0\io\ensight\vtkensightreader.cxx(1568): fatal error C1001: An internal error has occurred in the compiler.<br></div>
<div>1>  (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)<br></div>
<div>1>   To work around this problem, try simplifying or changing the program near the locations listed above.<br></div>
<div> </div>
<div>Experiments with updating the code in question did not fix the issue.<br></div>
<div>As I do not use the vtkIOEnSight project, the Gordian Knot solution was to simply remove this project from the build.</div>
<div> </div>
<div>On Mon, Aug 10, 2015, at 17:12, Audrius Stundzia wrote:<br></div>
<blockquote type="cite"><div>VTK Users,<br></div>
<div> </div>
<div>Thought I'd share the bug fixes that were required to build VTK 6.2.0 to build with MS VS2015 on Windows 10 x64<br></div>
<div>in case anyone else is trying to do the same.<br></div>
<div> </div>
<div>118>------ Build started: Project: ALL_BUILD, Configuration: Debug x64 ------<br></div>
<div>118>  Building Custom Rule E:/VTK/VTK-6.2.0/CMakeLists.txt<br></div>
<div>118>  CMake does not need to re-run because E:\VTK\CMakeFiles\generate.stamp is up-to-date.<br></div>
<div>========== Build: 25 succeeded, 93 failed, 0 up-to-date, 0 skipped ==========<br></div>
<div> </div>
<div>Wow.<br></div>
<div> </div>
<div>The following 4 bug fixes resulted in a successful build.<br></div>
<div> </div>
<div>1/ Project: vtklibxml2<br></div>
<div> </div>
<div>File: config.h<br></div>
<div> </div>
<div><div>/* Win32 Std C name mangling work-around */<br></div>
<div>/* MS VS2015: deprecated. <span style="line-height:10.8333330154419px;">snprintf is now the standard in VS2015. </span>*/<br></div>
<div>// #if defined(_MSC_VER)<br></div>
<div>// # define snprintf _snprintf<br></div>
<div>/ #endif<br></div>
<div> </div>
<div>2/ Project: vtktiff<br></div>
<div> </div>
<div>File: tiffiop.h<br></div>
<div> </div>
</div>
<div>// MS VS2015: added header<br></div>
<div># include <corecrt_search.h><br></div>
<div> </div>
<div>// MS VS2015: deprecated<br></div>
<div>/* #ifdef HAVE_SEARCH_H<br></div>
<div># include <search.h><br></div>
<div>#else<br></div>
<div>extern void *lfind(const void *, const void *, size_t *, size_t,<br></div>
<div>                   int (*)(const void *, const void *));<br></div>
<div>#endif */<br></div>
<div> </div>
<div>3/ Project: vtkhdf5<br></div>
<div> </div>
<div>File:  H5Omtime.c<br></div>
<div> </div>
<div>#elif defined(H5_HAVE_LNX_TIMEZONE) // Dummy argument for now<br></div>
<div>    /* Linux libc-5 */<br></div>
<div>    the_time -= timezone - (tm.tm_isdst?3600:0);<br></div>
<div>#elif defined(H5_HAVE_TIMEZONE) && defined(_MSC_VER) && _MSC_VER >= 1900<br></div>
<div>// In Visual Studio prior to VS2015 'timezone' is a global variable declared<br></div>
<div>// in time.h. That variable was deprecated and in VS2015 is removed, with<br></div>
<div>// _get_timezone replacing it.<br></div>
<div>long time_zone = 0;<br></div>
<div>_get_timezone(&time_zone);<br></div>
<div>the_time -= time_zone - (tm.tm_isdst ? 3600 : 0);<br></div>
<div> </div>
<div>Comment: Is this correct? Maybe, but frankly I don't care as I have less than zero interest in HDF5.<br></div>
<div> </div>
<div>4/ Project: vtkCommonCore<br></div>
<div> </div>
<div>File: vtkWin32ProcessOutputWindow.cxx<br></div>
<div> </div>
<div>Fix: add a space before and after PRIdword.<br></div>
<div> </div>
<div>// Construct the executable name from the process id, pointer to<br></div>
<div>  // this output window instance, and a count.  This should be unique.<br></div>
<div>  sprintf(exeName, "vtkWin32OWP_%" PRIdword "_%p_%u.exe",<br></div>
<div>          GetCurrentProcessId(), this, this->Count++);<br></div>
<div> </div>
<div>After the above 4 fixes, VTK 6.2.0 built and installed as it should.<br></div>
<div> </div>
</blockquote><div> </div>
</body>
</html>