在使用Visual Studio2010创建MFC工程后出现的编译错误:error C3083: 'Windows': the symbol to the left of a '::' must be a type,定位这个错误在这条语句上:System::Windows::Forms::Application::SetUnhandledExceptionMode(System::Windows::Forms::UnhandledExceptionMode::ThrowException);
可以通过以下步骤解决:右键单击Solution Explorer中的工程 --->
选择References --->
打开“Propery Pages”页,在左边栏选择Common Properties的Framework andReferences项 --->
在中间栏的下边点击“Add NewReferences ”按钮,弹出“Add References”对话框 --->
选择".NET"页 --->
选择“System.Windows.Forms 版本为 Version 4.0.0.0”项,请点击OK按钮确定 --->
返回到“Propery Pages”页,可以看到在“References”栏Name中新增了“System.Windows.Forms”项,点击“Propery Pages”页的确定按钮回到工程。 --->
重新编译工程看看。
VS2010:error C3083: 'Windows': the symbol to the left of a '::' must be a type
最新推荐文章于 2023-10-04 15:25:11 发布