【错误记录】Windows 控制台程序编译报错 ( fatal error C1083: 无法打开包括文件: “afxwin.h”: No such file or directory )

简介: 【错误记录】Windows 控制台程序编译报错 ( fatal error C1083: 无法打开包括文件: “afxwin.h”: No such file or directory )

文章目录

一、报错信息

二、解决方案





一、报错信息


使用 Visual Studio 2019 编译 WIndows 控制台程序 , 报错信息如下 :


1>------ 已启动生成: 项目: hacktool, 配置: Debug Win32 ------
1>HackCommand.cpp
1>Y:\002_WorkSpace\002_VS\MobileGameModify\hacktool\CNetwork.h(3,10): fatal error C1083: 无法打开包括文件: “afxwin.h”: No such file or directory
1>hacktool.cpp
1>Y:\002_WorkSpace\002_VS\MobileGameModify\hacktool\CNetwork.h(3,10): fatal error C1083: 无法打开包括文件: “afxwin.h”: No such file or directory
1>正在生成代码...
1>已完成生成项目“hacktool.vcxproj”的操作 - 失败。
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========




image.png




二、解决方案


打开 " Visual Studio Installer " , 选择 " 修改 " 选项 ,


image.png


找到 " 使用 C++ 的桌面开发 " 选项 ,

image.png



展开右侧 " 使用 C++ 的桌面开发 " 选项 , 找到 " 适用于最新 v142 生成工具的 C++ MFC ( x86 和 x64 ) " 选项 ,

image.png



勾选该 " 适用于最新 v142 生成工具的 C++ MFC ( x86 和 x64 ) " 选项 , 点击 " 修改 " 按钮 ;


image.png


等待 " Visual Studio Installer " 自动下载并安装上述组件即可 ;


image.png


修改完成后 , 报错解决 , 编译完成 ;


image.png

目录
相关文章
|
5月前
|
运维 安全 网络安全
Windows Server 2019拨号“找不到设备”?Error 1058解决指南
Windows Server 2019拨号报错1058?别急!这不是硬件故障,而是关键服务被禁用。通过“服务依存关系”排查,依次启动“安全套接字隧道协议”“远程接入连接管理”和“路由与远程访问”服务,仅需4步即可恢复PPPoE或VPN拨号功能,轻松解决网络中断问题。
452 1
|
4月前
|
Linux 虚拟化 iOS开发
VMware Remote Console 13.0.1 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
VMware Remote Console 13.0.1 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
945 0
VMware Remote Console 13.0.1 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
|
7月前
|
Linux 虚拟化 iOS开发
VMware Remote Console 13.0.0 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
VMware Remote Console 13.0.0 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
1744 0
VMware Remote Console 13.0.0 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
|
安全 网络安全 数据安全/隐私保护
Windows Server 2025 Active Directory 重置用户密码
密码重置是管理员日常任务之一,用户因忘记或多次输错密码导致账户锁定时需进行重置。本文介绍在Active Directory服务器上重置密码的三种方法。
1126 3
|
存储 Shell 开发工具
8-8|windows上Git报错
8-8|windows上Git报错
|
PHP Windows
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
308 1
|
资源调度 编译器 Linux
Windows10系统安装Truffle框架,安装失败,提示:error An unexpected error occurred: “https://xxxxx
Windows10系统安装Truffle框架,安装失败,提示:error An unexpected error occurred: “https://xxxxx
485 0
|
Shell PHP Windows
【Azure App Service】Web Job 报错 UNC paths are not supported. Defaulting to Windows directory.
【Azure App Service】Web Job 报错 UNC paths are not supported. Defaulting to Windows directory.
222 0
|
存储 Linux Windows
【应用服务 App Service】App Service For Windows 如何挂载Storage Account File Share 示例
【应用服务 App Service】App Service For Windows 如何挂载Storage Account File Share 示例
161 0
|
Java 开发工具 Spring
【Azure Spring Cloud】使用azure-spring-boot-starter-storage来上传文件报错: java.net.UnknownHostException: xxxxxxxx.blob.core.windows.net: Name or service not known
【Azure Spring Cloud】使用azure-spring-boot-starter-storage来上传文件报错: java.net.UnknownHostException: xxxxxxxx.blob.core.windows.net: Name or service not known
204 0