VS2017 c++关于#include 头文件错误问题

VS2017 c++关于#include 头文件错误问题

新安装的vs2017 c++桌面开发环境 
在编译控制台程序中 添加mfc支持时报 afx.h文件找不到。

参考:afxwin.h not found by VS2017

Reported by Paul Nelson 2016年11月16日 21:22 Closed - Not a Bug windows 10.0visual studio 2017 rc 
I have installed VS2017 with the C++ development tools, and then installed the MFC/ATL support tools. Running the VS2017 installer app shows them all installed. I also installed the Windows 10 SDK I then took a MFC app previously developed using VS2010, opened it with VS2017, retargeted it to the new compiler and retargeted it to the new SDK. However, when I try to rebuild it, it fails because it can't find afxwin.h 
隐藏 10 
avatar imageDaniel Griffing · 2016年11月16日 21:54 0 
Hello Paul, 
I'm sorry you're running into issues with upgrading this project to Visual Studio 2017 RC. Could you check whether you're seeing afxwin.h installed under the following location? (Please note the following assumes Enterprise on an x64 Windows machine) 
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.10.24629\atlmfc\include\afxwin.h" 
If the file is not there, could you double check whether the "ATL and MFC" optional feature in the Visual C++ Desktop workload is selected (I assume it will be based upon your problem description)? 
Please let me know either way and we can dig further. The next step in the investigation will depend on the answer to whether it was installed at all. 
Regards, 
–Daniel Griffing, Visual C++ Libraries 
来源: https://developercommunity.visualstudio.com/content/problem/2456/afxwinh-not-found-by-vs2017.html

解决方式:

手动添加安装 VS "MFC和ATL支持(x86和x64)"支持库

重启vs编译成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值