我想用vc连接SQL数据库,但是,每次我向stdafx.h中添加#import"C:\Program Files\Common Files\System\ado\msado15.dll"no_namespace rename("EOF","adoEOF"),会出现报错:
Compiling...
StdAfx.cpp
d:\mfc\dormsystem\debug\msado15.tlh(409) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
d:\mfc\dormsystem\stdafx.h(15) : error C2871: 'ADOCG' : does not exist or is not a namespace
g:\vc6\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
执行 cl.exe 时出错.DormSystem.exe - 1 error(s), 0 warning(s)
根据报错,我把afxv_32.h中的“WINDOWS.H”注释掉
错误变为:
Compiling...
StdAfx.cpp
d:\mfc\dormsystem\debug\msado15.tlh(409) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
g:\vc6\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
执行 cl.exe 时出错.DormSystem.exe - 1 error(s), 0 warning(s)
怎么回事儿?
Compiling...
StdAfx.cpp
d:\mfc\dormsystem\debug\msado15.tlh(409) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
d:\mfc\dormsystem\stdafx.h(15) : error C2871: 'ADOCG' : does not exist or is not a namespace
g:\vc6\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
执行 cl.exe 时出错.DormSystem.exe - 1 error(s), 0 warning(s)
根据报错,我把afxv_32.h中的“WINDOWS.H”注释掉
错误变为:
Compiling...
StdAfx.cpp
d:\mfc\dormsystem\debug\msado15.tlh(409) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
g:\vc6\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
执行 cl.exe 时出错.DormSystem.exe - 1 error(s), 0 warning(s)
怎么回事儿?
解决方案 »
- VC读取flash的数据
- MFC主对话框按钮CLICK呼叫另外的对话框的问题
- 求好书推介、、、、
- 如何从一个二进制的buffer中,找出某个特定串的位置?
- MFC基于对话框的程序中,如果在多个模式对话框中都有OnTimer函数;当产生WM_TIMER时,这些OnTimer函数会产生混乱吗?
- 大伙能帮我看看这段处理键盘消息的代码好吗?马上要交的作业,编译后一按键就死机,郁闷啊.
- 谁有逆向工程的资料,重谢
- 我不会了(EDIT BOX问题),在线等
- 请教各位大侠如何判断一个进程是否仍在运行?
- "go to definition of/reference to of height"的快捷键是什么?
- 基础问题,vs2005中如何编辑属性中的命令行
- 怎么判断某个目录下某个文件是否存在?
或则你的电脑上没有ADO的相关组件
C:\Program Files\Common Files\System\ado\msado15.dll 有没有这个msado15.dll文件 有可能你放在其他盘