【错误记录】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

目录
相关文章
|
10月前
|
运维 安全 网络安全
Windows Server 2019拨号“找不到设备”?Error 1058解决指南
Windows Server 2019拨号报错1058?别急!这不是硬件故障,而是关键服务被禁用。通过“服务依存关系”排查,依次启动“安全套接字隧道协议”“远程接入连接管理”和“路由与远程访问”服务,仅需4步即可恢复PPPoE或VPN拨号功能,轻松解决网络中断问题。
674 1
|
9月前
|
Linux 虚拟化 iOS开发
VMware Remote Console 13.0.1 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
VMware Remote Console 13.0.1 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
1873 0
VMware Remote Console 13.0.1 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
|
12月前
|
Linux 虚拟化 iOS开发
VMware Remote Console 13.0.0 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
VMware Remote Console 13.0.0 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
3078 1
VMware Remote Console 13.0.0 for macOS, Linux, Windows - vSphere 虚拟机控制台的桌面客户端
|
安全 网络安全 数据安全/隐私保护
Windows Server 2025 Active Directory 重置用户密码
密码重置是管理员日常任务之一,用户因忘记或多次输错密码导致账户锁定时需进行重置。本文介绍在Active Directory服务器上重置密码的三种方法。
1820 3
基本的Dos命令 在控制台如何进入某一个文件或者进入不同的盘符
这篇文章介绍了如何在Windows DOS命令行环境中进入不同盘符和文件夹,包括使用Win+R快捷键打开运行窗口、通过输入盘符加冒号(如"D:")切换到指定盘符、使用"cd"命令进入文件夹,以及一些基本的文件操作命令如"dir"查看文件和"del"删除文件等。
基本的Dos命令 在控制台如何进入某一个文件或者进入不同的盘符
|
监控 机器人 Unix
GoLand——windows下如何编译Linux二进制文件
GoLand——windows下如何编译Linux二进制文件
308 1
GoLand——windows下如何编译Linux二进制文件
|
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. 错误
379 1
|
资源调度 编译器 Linux
Windows10系统安装Truffle框架,安装失败,提示:error An unexpected error occurred: “https://xxxxx
Windows10系统安装Truffle框架,安装失败,提示:error An unexpected error occurred: “https://xxxxx
577 0
|
并行计算 开发工具 异构计算
在Windows平台使用源码编译和安装PyTorch3D指定版本
【10月更文挑战第6天】在 Windows 平台上,编译和安装指定版本的 PyTorch3D 需要先安装 Python、Visual Studio Build Tools 和 CUDA(如有需要),然后通过 Git 获取源码。建议创建虚拟环境以隔离依赖,并使用 `pip` 安装所需库。最后,在源码目录下运行 `python setup.py install` 进行编译和安装。完成后即可在 Python 中导入 PyTorch3D 使用。
1927 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.
315 0