VS2010之MFC编译库引起的错误
来源:互联网 发布:小米软件自动升级 编辑:程序博客网 时间:2024/06/05 10:57
在已经安装了VS2008或者之前版本的计算机上安装VS2010,用VS2010新建一个MFC程序,编译都通不过,错误如下:
1>ClCompile:
1> stdafx.cpp
1>d:\kqtdcbnew\kqgisframe\lib\mso9.tlh(931): warning C4146: 一元负运算符应用于无符号类型,结果仍为无符号类型
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxglobals.h(375): error C2143: 语法错误 : 缺少“;”(在“*”的前面)
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxglobals.h(375): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxglobals.h(375): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxglobals.h(375): warning C4183: “GetITaskbarList3”: 缺少返回类型;假定为返回“int”的成员函数
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxglobals.h(413): error C2143: 语法错误 : 缺少“;”(在“*”的前面)
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxglobals.h(413): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxglobals.h(413): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认
1>d:/program files/microsoft visual studio 10.0/vc/atlmfc/include/afxglobals.h(375): error C2143: syntax error : missing ';' before '*'
1>d:/program files/microsoft visual studio 10.0/vc/atlmfc/include/afxglobals.h(375): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:/program files/microsoft visual studio 10.0/vc/atlmfc/include/afxglobals.h(375): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:/program files/microsoft visual studio 10.0/vc/atlmfc/include/afxglobals.h(375): warning C4183: 'GetITaskbarList3': missing return type; assumed to be a member function returning 'int'
1>d:/program files/microsoft visual studio 10.0/vc/atlmfc/include/afxglobals.h(413): error C2143: syntax error : missing ';' before '*'
1>d:/program files/microsoft visual studio 10.0/vc/atlmfc/include/afxglobals.h(413): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:/program files/microsoft visual studio 10.0/vc/atlmfc/include/afxglobals.h(413): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
查看错误文件,发现ITaskbarList3没有定义,出现这种问题最大的可能就是包含目录的问题。
检查VC包含目录发现,这里包含的目录都是继承于VS2008的,因此需要修改:
1. 菜单View--> Property Manager
2. 在属性管理界面上展开当前工程,选择debug或者release下的Microsoft.Cpp.Win32.user,双击打开属性对话框
3. 查看VC Directories下面的设置,发现引用的SDK是6.0版本,我们需要修改为v7.0A版本
4. 修改保存后,整个VS2010的默认设置就修改了,该文件保存在%User%/AppData/Local/Microsoft/MSBuild/v4.0目录下。
修改后,程序就可以编译成功了。
- VS2010之MFC编译库引起的错误
- VS2010 MFC工程的MFC库使用方式与运行时库不一致引起的编译问题
- VS2010 MFC工程的MFC库使用方式与运行时库不一致引起的编译问题
- VS2010 MFC工程的MFC库使用方式与运行时库不一致引起的编译问题
- 在VS2010进行MFC编程设置字符集的问题(使用多字节字符集引起错误)
- inline引起的编译错误
- mspdb80.dll引起的编译错误
- 函数调用方式引起的编译错误
- 由编译警告引起的程序错误
- 内存不足引起的编译(make)错误
- 用VS2010建了一个默认的MFC应用程序,编译后出现如下错误。
- vs2010 项目或者MFC编译错误 转换到coff期间失败的详细解决方法
- vs2010 项目或者MFC编译错误 转换到coff期间失败的详细解决方法
- VS2010编译MFC程序出错的原因
- MFC异常处理机制,获取异常引起的错误
- VS2010 _ITERATOR_DEBUG_LEVEL 不匹配的编译错误
- gcc新版本引起的编译错误(命令执行时的外部库输入位置)
- Windows版本宏的定义引起的编译错误
- vs2010 启动调试、停止调试速度很慢
- Android Frame Animation
- Jira使用问题记录
- UVa 10817 - Headmaster's Headache (简单DP 状态压缩)
- PPC活动的优化利用Prosper202
- VS2010之MFC编译库引起的错误
- php开发之截取中文字符,包括utf-8
- PPC广告 - 如何进行上下文广告工作
- PHP编程语言概述
- 计算机视觉代码合集(4)
- web.xml配置
- boost锁的概述
- 气象传真在我国的发展之路
- SAP BAPI MB01