VS 2015 C++ Cannot find corecrt.h and cannot open file ‘ucrtd.lib‘

Posted scruffybear

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了VS 2015 C++ Cannot find corecrt.h and cannot open file ‘ucrtd.lib‘相关的知识,希望对你有一定的参考价值。

问题

创建VS 2015 CLR Console Application项目,进行编译,出现以下两个错误:
1,Cannot find corecrt.h
2,LINK : fatal error LNK1104: cannot open file ‘ucrtd.lib’
对项目进行配置可解决问题。

解决

VS 2015 --> Debug --> Project Properties --> VC++ Directories

在 'Include Directores’里添加corecrt.h在我的电脑所在的目录:

C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.10150.0\\ucrt

在Library Directories里添加’ucrtd.lib’在我的电脑所在的目录:

C:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.10150.0\\ucrt\\x64

重新编译,问题解决。

参考

Cannot find corecrt.h: $(UniversalCRT_IncludePath) is wrong
LINK : fatal error LNK1104: cannot open file ‘ucrtd.lib’ in VS2017 RC

以上是关于VS 2015 C++ Cannot find corecrt.h and cannot open file ‘ucrtd.lib‘的主要内容,如果未能解决你的问题,请参考以下文章

C++学习(三五六)cannot find -liconv -lgnustl_shared

vs 2010 Cannot find or open the PDB file

解决启动SQL Server Management Studio 17时报Cannot find one of more components...的问题

手记解决启动SQL Server Management Studio 17时报Cannot find one of more components...的问题

已经安装好了gcc 但是为啥还出现Cannot find appropriate C++ compiler on this system

[C++]VS2015用array申请50万int类型数组,程序报栈空间溢出