Cannot Open File atls.lib

前端 未结 7 929
无人及你
无人及你 2021-02-15 13:16

I have atls.lib in my hard drive, but I can\'t link it into my Visual Studio project. I know that atls.lib is an ATL specific library file, and I have all the ATL files/headers/

相关标签:
7条回答
  • 2021-02-15 13:28

    This issue started happening to me after a recent VS2019 update I got. I noticed that it was because Spectre Mitigation had been automatically enabled but I didn't have the Spectre Mitigation version of the library.

    Installing the Spectre Mitigation version, or disabling Spectre Mitigation are both possible fixes.

    0 讨论(0)
  • 2021-02-15 13:30

    Just to keep this question updated, I encountered this error after running the install for Spectre, the VC++ spec code mitigation tool. After looking at the VC++ directories, I noticed that both the Include Directories and the Library Directories have changed to add a "Spectre" addition to the path, while the original path to the actual file is no longer there. I will update this later after I figure out whether Spectre didn't install correctly, or if simply changing the path will solve the issue; I do NOT want the speculative attack exposed in my code, which apparently happens with ATL code.

    EDIT

    My compiler is VS 2017 Community Edition.

    EDIT

    The solution that worked for me is here, discovered by Holger Schmeken

    0 讨论(0)
  • 2021-02-15 13:31

    I added <Visual Studio folder\VC\Tools\MSVC\14.15.26726\atlmfc\lib\x64\atls.lib> to the Linker>Input> Additional Dependencies in solution properties and it got resolved.

    0 讨论(0)
  • 2021-02-15 13:46

    It seems that the library directory has not been added. In Project Properties, Linker, General options, add the directory where atls.lib resides to the Additional Library Directories field.

    0 讨论(0)
  • 2021-02-15 13:51

    Fixed for me running a 32 bit driver using VS2019, by installing the following Individual Component through the Visual Studio Installer:

    • C++ ATL for latest v142 build tools with Spectre Mitigations (x86 & x64)
    0 讨论(0)
  • 2021-02-15 13:51

    I have soloved this problem by just copying this file to my project folder.

    0 讨论(0)
提交回复
热议问题