Project

General

Profile

localtime.c causes problems in MSVC 2015 & is not needed

Added by Arnold Wiegert over 5 years ago

After moving exiv2 (only static linked, Unicode debug version tested/compiled) it gave me a hard error when compiling localtime.c at:
localtime.c(934): tzname[tmp->tm_isdst] = &sp->chars[ttisp->tt_abbrind];
because tzname[] is undefined.
In fact we have a comment in the same file: localtime.c(194):/* ahu: deleted definition of tzname[] */

To fix this, I simply removed the file loacaltime.c from all sub projects, including libexiv2 and all ( except geotags & conntest - they have other issues) compiled, though I did not run all executables to verify.

MSVC 2013 had complained about localtime.c but excluded it from linking because it detected that it did not provide any variables or function that were needed or used.
MSVC 2015 was not so forgiving.


Replies (3)

RE: localtime.c causes problems in MSVC 2015 & is not needed - Added by Robin Mills over 5 years ago

That's really odd. The build server builds that every night on 2005/8/10/12/13/15. I'll check the logs. For sure that code's been in the mix forever.

It's quite likely that local time.c is not really needed in most of the sample applications. The .vcproj files were stamped out by using one (exiv2.vcproj, I think) as a template. Whether it's needed or not, I just compile and link it.

I'll have a look at this tomorrow. Thanks for letting me know. I'm very surprised to hear about this.

RE: localtime.c causes problems in MSVC 2015 & is not needed - Added by Robin Mills over 5 years ago

I've thought of why I didn't detect this on the buildserver. The buildserver builds and tests the library. To save time (because it's building 2005/8/10/12/13/15), it doesn't build the sample applications. So, it's MSVC 2015 + samples that's broken and I didn't know.

Software is a mine field. We have a lot of build and test infrastructure to detect all this stuff. With every step, you can have your leg blown off.

Thanks again for letting me know. I'll get that fixed on Sunday.

    (1-3/3)