VC6.0会编译通过的项目VS2008编译报错

VC6.0能编译通过的项目VS2008编译报错
本帖最后由 huangchaoming 于 2012-11-23 14:58:54 编辑
一个项目包括ADOConnect.h 和ADOConnect.cpp在VC6.0下能顺利编译通过 移植到VS2008却编译错误:
#error MFC require use of Winsock2.h 头文件包含如下:

希望各位大侠能帮忙解决这个问题
------最佳解决方案--------------------
#include <Windows.h>
#include <string>
#include <comdef.h>
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace rename("EOF","adoEOF")

using namespace std;
这么搞的话,我的VC6和VS2008都能编译过去的,并且我封装了不仅仅是oracle还有mysql还有sql、access的数据库,刚在vs里移植了一下,没问题
------其他解决方案--------------------
估计是VS 2008 最低平台支持的问题

#ifndef WINVER                          // 指定要求的最低平台是 Windows Vista。
#define WINVER 0x0600//改成0x0501          // 将此值更改为相应的值,以适用于 Windows 的其他版本。
#endif
 
#ifndef _WIN32_WINNT            // 指定要求的最低平台是 Windows Vista。
#define _WIN32_WINNT 0x0600//改成0x0501     // 将此值更改为相应的值,以适用于 Windows 的其他版本。
#endif

见我以前的帖子http://bbs.csdn.net/topics/210087989
------其他解决方案--------------------
图比你头像还小。。。
------其他解决方案--------------------
眼睛的分辨率太低,无法看清提供的信息
------其他解决方案--------------------
VS2008的检查比VC6.0更严格. 
编译不能通过, 那就找原因呗. 看错误提示, 然后再贴上错误码, 或者直接自己 Baidu Google
------其他解决方案--------------------
我的失误  
头文件包含如下:
#pragma warning(disable:4146)
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" named_guids rename("EOF","adoEOF"), rename("BOF","adoBOF")
#pragma warning(default:4146)

#ifdef _WINDOWS_
#undef _WINDOWS_
#include <afx.h>
#include <afxdisp.h>
#endif
#include <math.h>
#include <icrsint.h>
#include <ATLComTime.h>
using namespace ADODB; 
------其他解决方案--------------------
问题已经解决!~ 刚开始我是用VS2008打开VC工程出现上述的错误,后来新建VS2008空工程在把VC下的文件导入不会出现系统头文件的错误只是些常规错误 改正后问题解决!