MantisBT - VTK
View Issue Details
0015534VTK(No Category)public2015-06-11 12:522016-07-06 11:19
dkuegler 
Sean McBride 
normalminorhave not tried
closedfixed 
6.0.0 
 
TBD
incorrect functionality
0015534: Visual Studio 2015 Compilation Errors
Hello,

I am trying to compile VTK 6.2.0 on Visual Studio 2015 RC.

I have made the following observations:
I get the following error:
Severity Code Description Project File Line
Error C2065 'timezone': undeclared identifier vtkhdf5 G:\Toolkits\VTK\VTK-6.2.0\ThirdParty\hdf5\vtkhdf5\src\H5Omtime.c 226

From \H5Omtime.c

#elif defined(H5_HAVE_TIMEZONE)
    /* Linux libc-5 */
    the_time -= timezone - (tm.tm_isdst?3600:0);

CMAKE defines in H5pubconf.h
/* Define if `timezone' is a global variable */
#define H5_HAVE_TIMEZONE 1

According to https://msdn.microsoft.com/en-us/library/htb3tdkc.aspx [^]
_get_timezone() should be used.
No tags attached.
related to 0015535closed  Visual Studio 2015 Compilation Errors 
Issue History
2015-06-11 12:52dkueglerNew Issue
2015-06-11 14:49dkueglerNote Added: 0034539
2015-06-11 15:32dkueglerNote Added: 0034540
2015-07-08 05:48dkueglerNote Added: 0034689
2015-08-28 08:28T.J. CoronaRelationship addedrelated to 0015535
2016-07-06 11:19Sean McBrideNote Added: 0036176
2016-07-06 11:19Sean McBrideStatusbacklog => closed
2016-07-06 11:19Sean McBrideAssigned To => Sean McBride
2016-07-06 11:19Sean McBrideResolutionopen => fixed

Notes
(0034539)
dkuegler   
2015-06-11 14:49   
H5_HAVE_TIMEZONE should not be defined. Instead lines 236 to 245 should be used, as HDgettimeofsay seems ti be bound to a Wgettimeofday, which gets defined in H5win32defs.h

so instead H5_HAVE_STRUCT_TIMEZONE, H5_HAVE_GETTIMEOFDAY and H5_GETTIMEOFDAY_GIVES_TZ should possibly be defined for Visual Studio 2015 RC.
(0034540)
dkuegler   
2015-06-11 15:32   
For some reason timezone gets defined in time.h on line 275 for Visual Studio 2012, but not for Visual Studio 2015.

So I assume, H5_HAVE_TIMEZONE should have been undefined for Windows all along. Due to it being defined in time.h, it never caused any problems.
(0034689)
dkuegler   
2015-07-08 05:48   
See https://gitlab.kitware.com/vtk/vtk/merge_requests/311 [^]
(0036176)
Sean McBride   
2016-07-06 11:19   
Looks like this was fixed by:
https://gitlab.kitware.com/vtk/vtk/merge_requests/446 [^]

Please reopen if still an issue.