[vtkusers] Update 1 | Bug fix notes for building VTK 6.2.0 with MS VS2015 on Windows 10 x64

Audrius Stundzia audrius at tomographix.com
Tue Aug 11 11:03:43 EDT 2015


VTK Users,

The previous reported fixes apply to both the VTK 6.2.0 Debug and
Release version builds.

In building the VTK 6.2.0 Release version, specifically, encountered the
following MS VS2015 RTM  compiler bug [previously reported by Yordan
Kyosev with no resolution]

Project: vtkIOEnSight

File: vtkEnSightReader.cxx

1> vtkEnSightReader.cxx
1> Generating Code...
1>e:\vtk\vtk-6.2.0\io\ensight\vtkensightreader.cxx(1568): fatal error
    C1001: An internal error has occurred in the compiler.
1> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)
1> To work around this problem, try simplifying or changing the program
   near the locations listed above.

Experiments with updating the code in question did not fix the issue. As
I do not use the vtkIOEnSight project, the Gordian Knot solution was to
simply remove this project from the build.

On Mon, Aug 10, 2015, at 17:12, Audrius Stundzia wrote:
> VTK Users,
>
> 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 in case anyone else is
> trying to do the same.
>
> 118>------ Build started: Project: ALL_BUILD, Configuration: Debug x64
>     ------
> 118> Building Custom Rule E:/VTK/VTK-6.2.0/CMakeLists.txt
> 118> CMake does not need to re-run because
>      E:\VTK\CMakeFiles\generate.stamp is up-to-date.
> ========== Build: 25 succeeded, 93 failed, 0 up-to-date, 0 skipped
> ========== ==========
>
> Wow.
>
> The following 4 bug fixes resulted in a successful build.
>
> 1/ Project: vtklibxml2
>
> File: config.h
>
> /* Win32 Std C name mangling work-around */ /* MS VS2015: deprecated.
> snprintf is now the standard in VS2015. */ // #if defined(_MSC_VER) //
> # define snprintf _snprintf / #endif
>
> 2/ Project: vtktiff
>
> File: tiffiop.h
>
> // MS VS2015: added header
> # include <corecrt_search.h>
>
> // MS VS2015: deprecated /* #ifdef HAVE_SEARCH_H
> # include <search.h>
> #else extern void *lfind(const void *, const void *, size_t *, size_t,
> int (*)(const void *, const void *)); #endif */
>
> 3/ Project: vtkhdf5
>
> File:  H5Omtime.c
>
> #elif defined(H5_HAVE_LNX_TIMEZONE) // Dummy argument for now    /*
> Linux libc-5 */    the_time -= timezone - (tm.tm_isdst?3600:0); #elif
> defined(H5_HAVE_TIMEZONE) && defined(_MSC_VER) && _MSC_VER >= 1900 //
> In Visual Studio prior to VS2015 'timezone' is a global variable
> declared // in time.h. That variable was deprecated and in VS2015 is
> removed, with // _get_timezone replacing it. long time_zone = 0;
> _get_timezone(&time_zone); the_time -= time_zone - (tm.tm_isdst ?
> 3600 : 0);
>
> Comment: Is this correct? Maybe, but frankly I don't care as I have
> less than zero interest in HDF5.
>
> 4/ Project: vtkCommonCore
>
> File: vtkWin32ProcessOutputWindow.cxx
>
> Fix: add a space before and after PRIdword.
>
> // Construct the executable name from the process id, pointer to  //
> this output window instance, and a count.  This should be unique.
> sprintf(exeName, "vtkWin32OWP_%" PRIdword "_%p_%u.exe",
> GetCurrentProcessId(), this, this->Count++);
>
> After the above 4 fixes, VTK 6.2.0 built and installed as it should.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150811/acbe1bff/attachment.html>


More information about the vtkusers mailing list