Cannot Open File atls.lib

ぃ、小莉子 提交于 2019-12-05 09:11:52

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.

In my case the problem was missing ATL/MFC libraries for x64, I had to add them in the Visual Studio installer (it was an open source project, so I wasn't aware of the requirement).

Once again, the invaluable procmon did the job:
While atls.lib was found under $(VCInstallDir)atlmfc\lib the linker looked in $(VCInstallDir)atlmfc\lib\amd64.

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

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!