vs2003 mfc项目转换为vs2010项目遇到的问题

出现错误:

1. 计算机未注册mscomm控件,解决方法见http://blog.csdn.net/chenyujing1234/article/details/7843052;


2.1>ClCompile:
1>  stdafx.cpp
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxwin.h(4024): error C2061: 语法错误: 标识符“PSCROLLBARINFO”
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxwin4.inl(184): error C2065: “PSCROLLBARINFO”: 未声明的标识符
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxwin4.inl(184): error C2146: 语法错误: 缺少“)”(在标识符“pScrollInfo”的前面)
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxwin4.inl(184): error C2761: “BOOL CScrollBar::GetScrollBarInfo(void) const”: 不允许成员函数重新声明
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxwin4.inl(184): error C2059: 语法错误:“)”
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxwin4.inl(185): error C2143: 语法错误 : 缺少“;”(在“{”的前面)
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxwin4.inl(185): error C2447: “{”: 缺少函数标题(是否是老式的形式表?)
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxcmn3.inl(20): error C2065: “CCM_SETWINDOWTHEME”: 未声明的标识符
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxcmn3.inl(23): error C2065: “CCM_SETWINDOWTHEME”: 未声明的标识符
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxcmn3.inl(29): error C2065: “CCM_SETWINDOWTHEME”: 未声明的标识符
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxcmn3.inl(46): error C2065: “CCM_SETWINDOWTHEME”: 未声明的标识符
解决方法:http://blog.csdn.net/cs_21cn/article/details/7925455

To fix this problem, make your stdafx.h file look like this:

// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif

#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif

#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0501 // Change this to the appropriate value to target Windows Me or later.
#endif

#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0500 // Change this to the appropriate value to target IE 5.0 or later.
#endif

3.odbccp32.lib(dllload.obj) : error LNK2019: 无法解析的外部符号 __imp___vsnprintf,该符号在函数 _StringVPrintfWorkerA@20 中被引用


解决方法:从别的地方或者网络上下载这个库文件,放入VS安装目录里的VC\lib目录即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值