none
Unresolved external even after linking legacy_stdio_definitions.lib;

    General discussion

  • Hi,

    I am in the process of upgrading our application from Visual Studio 2012 to 2015 and have run into a number of link errors relating to some functions that have been removed in the new runtime libraries.

    After researching online I found that other people had experienced the same problem and had resolved it by including "legacy_stdio_definitions.lib" in their link.  While this helps to resolve many of the unresolved externals in my project I am still getting the following errors:

    error LNK2001: unresolved external symbol __imp___iob

    error LNK2001: unresolved external symbol __imp__vsprintf

    error LNK2001: unresolved external symbol __imp___pctype

    error LNK2001: unresolved external symbol __imp____mb_cur_max

    Unfortunately these link errors are due to a third party library which we link, and there is no option to get an updated version of that library.

    Is microsoft aware of this and is there a workaround that I can use?

    Thanks very much for your time.

    Sean.

    • Changed type Sean Clarke Tuesday, July 12, 2016 2:55 AM
    Tuesday, July 05, 2016 3:42 AM

All replies

  • Hi Sean,

    >> Unfortunately these link errors are due to a third party library which we link, and there is no option to get an updated version of that library.

    Since this compile error caused by third part library, please contact the provider of this library to confirm whether they are support Visual Studio 2015.

    This problem occurred when upgrading your project from Visual Studio 2012 to Visual Studio 2015, please try compile your project in Visual Studio 2015 with Visual Studio 2012 platform.

    Please right-click your project to open the property page window and change the Platform Toolset to Visual Studio 2012. But please make sure your Visual Studio 2012 and Visual Studio 2015 are installed on the same machine, which can let you choose the Visual Studio 2012 platform in Visual Studio 2015.

    If still has this compile issue with Visual Studio 2012 platform, I'm afraid that you still need to contact the third part library provider to resolve this issue.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, July 06, 2016 3:02 AM
    Moderator
  • Thanks for the reply Weiwei,

    I have found another thread where someone had this same issue:

    https://connect.microsoft.com/VisualStudio/feedback/details/1039102

    As part of the reply from James he states  "Additionally, the legacy_stdio_definitions.lib library is currently missing the __imp_-prefixed aliases required by some libraries; these will be added in a future builds of Visual Studio 2015."

    This is what I require to fix my problem.  I have just installed 2015 Update 3 and it is not resolved so would you be able to tell me in which future update it will be included with?

    Thanks again for your time.

    Sean.

    Friday, July 08, 2016 1:51 AM
  • Hi Sean Clarke,

    Thanks for your response and provide the information for us.

    I have checked the Visual Studio 2015 release note from RTM to update 3, I don't find any release information about the missing _imp_-prefixed aliases. And I don't get any news about when it will be added into.

    If you want to use the _imp_-prefixed aliases in your project, I suggest you use previous version of Visual Studio before it is added into Visual Studio 2015.

    If any news about this issue, I will update the news here as soon as possible.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, July 11, 2016 1:39 AM
    Moderator
  • Thankyou WeiWei,

    Please notify me as soon as you have any further information.  This issue is a blocker for us upgrading our software to Visual Studio 2015.

    Regards,

    Sean.

    Monday, July 11, 2016 2:53 AM
  • Hi Sean Clarke,

    Since your problem need be resolved by the missing _imp_-prefixed aliases and at the moment we don't have any news, I suggest you change this thread as General Discussion through the Change Type hyperlink on right-top of this thread.

    If any updates, I will update the news and change this thread back to question.

    Thanks for your understanding.

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, July 12, 2016 12:49 AM
    Moderator
  • Thankyou WeiWei,

    Please notify me as soon as you have any further information.  This issue is a blocker for us upgrading our software to Visual Studio 2015.

    Regards,

    Sean.


    Can't you simply fix your source code by  adding "include <stdio.h>" (or conio.h)? Or is this third party software where you can't modify the code?
    Tuesday, July 12, 2016 1:24 AM
  • Unfortunately this is third party software which the vendor is unable to provide an update for.

    Thanks Brian.

    Tuesday, July 12, 2016 1:34 AM
  • Unfortunately this is third party software which the vendor is unable to provide an update for.

    Thanks Brian.

    That sucks.

    We had a similar experience and we ended up wrapping the third party code and creating a COM DLL, using the older version of the compiler to build. This allowed us to migrate the client code to the newer compiler, and call into the old code using DCOM.

    Not sure if this would be an option for you. It might mean substantial work.

    Tuesday, July 12, 2016 4:50 AM
  • Thanks for the suggestion Brian,

    This is something we have considered however it's not a viable option for us at present.  We will have to wait for Microsoft to address the issue with the missing "_imp_" prefix's

    Thursday, July 14, 2016 2:49 AM