locked
Linker failure when building using Visual Studio 2019 RRS feed

  • Question

  • Not sure if I am in the right Forum but perhaps someone can advise!

    My project is being moved from Visual Studio 2010 to Visual Studio 2019 and I am trying to evaluate and solve issues. When I build my project using VS2019 I get the following linker errors:

    libpost.lib(sucfile.obj) : error LNK2019: unresolved external symbol __daylight referenced in function __totalsec
    libpost.lib(sucfile.obj) : error LNK2019: unresolved external symbol __timezone referenced in function __totalsec
    libpost.lib(l_getenv.obj) : error LNK2019: unresolved external symbol __environ referenced in function _pXtWgzN5X32ssD34ZpsSW
    

    The libpost.lib is provided by a third party company and I cannot rebuild it or find the source for it. I know that _daylight and _timezone have been deprecated by Microsoft. I have tried to add the legacy_stdio_definitions.lib to my library path but I still get the failures.

    I have gone down the route of installing the VS2010 toolset/sdk/compiler which I have success in building with, but company policy is telling me I cannot use unsupported toolsets etc because of potential security issues.

    My question is - is there another legacy lib I can include from Microsoft to get around this problem, or has anyone else had a similar problem and know of a workaround.

    Thanks in advance, Pete.

    • Moved by CoolDadTx Friday, October 9, 2020 1:55 PM C++ related
    Friday, October 9, 2020 1:29 PM

All replies

  • This is the C# forum. Your question is related to C++. Please post in the C++ forums which have moved to the new Q&A forums.

    Michael Taylor http://www.michaeltaylorp3.net

    • Proposed as answer by KHURRAM RAHIM Friday, November 27, 2020 5:01 PM
    Friday, October 9, 2020 1:54 PM