0

I'm trying to compile a project from vs 2005 on 2019. I've fixed all the other errors, but I can't seem to get around this error with a static library from perforce:

error LNK2019: unresolved external symbol __tzname referenced in function "public: void __thiscall DateTime::FmtTz(char *)const " (?FmtTz@DateTime@@QBEXPAD@Z)

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
Benjerman
  • 1
  • 1
  • Can you change it to `_tzname`? Or perhaps define `char* (&__tzname)[2] = _tzname;`? – Ted Lyngmo Nov 25 '20 at 22:45
  • this call is only contained in the library I'm guessing. I've done a search through all the code and it does not contain _tzname. – Benjerman Nov 25 '20 at 22:47
  • No, but the newer version of VS contains `_tzname` so if you change to that, it may work. If you can't change the code using `__tzname` you could perhaps create it as a reference to `_tzname` like I showed. – Ted Lyngmo Nov 25 '20 at 22:49
  • Add oldnames.lib to the linker's Additional Dependencies setting. – Hans Passant Nov 25 '20 at 22:57

0 Answers0