"fatal error LNK 1181:cannot open input file 'onecoreuap.lib".

Aishwarya Bhat 1 Reputation point
2020-11-06T11:56:27.647+00:00

Hi,

When I try to compile DLL source file in Visual 2013 with build tool set Visual Studio 2013(V120), am facing the following error:

"fatal error LNK 1181:cannot open input file 'onecoreuap.lib".

Please anyone help how to solve this error.

Regards,

Aishwarya Bhat

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
999 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Dylan Zhu-MSFT 6,416 Reputation points
    2020-11-09T02:50:01.46+00:00

    Hi Aishwarya Bhat,

    Thank you for feedback. I have create a new project with OneCoreUap.lib, and met the same error. I found, the onecoreuap.lib is a component of Windows 10 SDK. But the visual studio 2013 is based on windows 8.1 SDK. So we recommend you could use visual studio 2015 or later version.

    Or you need to change these default properties in Project Properties->VC++ Directories in visual studio 2013:

    • Executable Paths: replace $(WindowsSDK_ExecutablePath) with C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86 and C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools
    • Include Paths: replace $(WindowsSDK_IncludePath) with C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um and C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared and C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\winrt
    • Library Paths: replace $(WindowsSDK_LibraryPath_x86) with C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86
    • Exclude Paths: replace $(WindowsSDK_IncludePath) with C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86

    In addition, you also need to add C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib in Project properties-> linker -> General -> Additional Include Directories.

    After that it could build successfully.

    Best Regards,
    Dylan

    ----
    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.