MFC
1. Microsoft.CppBuild.targets(418,5): error MSB8041: MFC libraries are require
<!-- Error out if required optional components are not installed -->
<!-- MFC -->
<VCMessage Code="MSB8041" Type="Error" Arguments="MFC" Condition="'$(CheckMFCInstalled)' == 'true' and !Exists($(MFC_KeyFile)) and '$(SpectreLibs)' == ''" />
<VCMessage Code="MSB8042" Type="Error" Arguments="MFC" Condition="'$(CheckMFCInstalled)' == 'true' and !Exists($(MFC_KeyFile)) and '$(SpectreLibs)' != ''" />
<!-- ATL -->
<VCMessage Code="MSB8041" Type="Error" Arguments="ATL" Condition="'$(CheckATLInstalled)' == 'true' and !Exists($(ATL_KeyFile)) and '$(SpectreLibs)' == ''" />
<VCMessage Code="MSB8042" Type="Error" Arguments="ATL" Condition="'$(CheckATLInstalled)' == 'true' and !Exists($(ATL_KeyFile)) and '$(SpectreLibs)' != ''" />
<!-- Error out if Spectre libraries are not installed. See https://aka.ms/Ofhn4c for more information. -->
<VCMessage Code="MSB8040" Type="Error" Condition="'$(DesignTimeBuild)' != 'true' and
'$(CheckMSVCComponents)' != 'false' and
'$(SpectreMitigation)' != '' and
'$(SpectreMitigation)' != 'false' and
(('$(_VC_Target_Library_Platform)' == 'OneCore' and !Exists('$(VC_LibraryPath_VC_x86_OneCore_spectre)')) or
('$(_VC_Target_Library_Platform)' == 'Desktop' and !Exists('$(VC_LibraryPath_VC_x86_Desktop_spectre)')))" />
解决的方法:VS2019 --->工具--->获取工具与功能
MFC 库。
2.错误 1 error C2440: “static_cast”: 无法从“void (__thiscall CAutoView::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”
3.VS2010 fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
用新版cvtres.exe(VC6.0)替换旧版本的cvtres.exe(VS2010)
4.LINK : fatal error LNK1117: 选项“mapinfo:lines”中的语法错误
项目属性--->链接器--->命令行--->mapinfo:lines 去掉
因篇幅问题不能全部显示,请点此查看更多更全内容