in C/C++

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

@TOC

问题

创建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

Write a Comment

Comment

nineteen − 18 =