多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

國(guó)內(nèi)最全I(xiàn)T社區(qū)平臺(tái) 聯(lián)系我們 | 收藏本站
阿里云優(yōu)惠2
您當(dāng)前位置:首頁(yè) > php開源 > php教程 > error C2871: “ADODB”: 具有該名稱的命名空間不存在(error C2871: “ADODB”: 具有該名稱的命名空間不存在)

error C2871: “ADODB”: 具有該名稱的命名空間不存在(error C2871: “ADODB”: 具有該名稱的命名空間不存在)

來源:程序員人生   發(fā)布時(shí)間:2015-04-28 08:27:58 閱讀次數(shù):6417次

1.WINDOWS.H already included. MFC apps must not #include <windows.h>

I just added the #import "C:Program FilesCommon FilesSystemadomsado15.dll" no_namespace rename("EOF","ADOEOF")

in the <StdAfx.h> file. When the import sentence was add in the head of file,the error occured. But when I moved it to the tail of the file,Everything was OK. I don't know why.

 

// stdafx.h : include file for standard system include files,

//  or project specific include files that are used frequently, but

//      are changed infrequently

//

//#import "C:Program FilesCommon FilesSystemadomsado15.dll" no_namespace rename("EOF","adoEOF")   ////error

#if !defined(AFX_STDAFX_H__C914C8D4_56EB_44CD_AE77_600C6D941BA2__INCLUDED_)

#define AFX_STDAFX_H__C914C8D4_56EB_44CD_AE77_600C6D941BA2__INCLUDED_

 

#if _MSC_VER > 1000

#pragma once

#endif // _MSC_VER > 1000

 

#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers

 

#include <afxwin.h>         // MFC core and standard components

#include <afxext.h>         // MFC extensions

#include <afxdisp.h>        // MFC Automation classes

#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls

#ifndef _AFX_NO_AFXCMN_SUPPORT

#include <afxcmn.h> // MFC support for Windows Common Controls

#endif // _AFX_NO_AFXCMN_SUPPORT

#import "C:Program FilesCommon FilesSystemadomsado15.dll" no_namespace rename("EOF","ADOEOF") ////is OK

 

//{{AFX_INSERT_LOCATION}}

// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

 

#endif // !defined(AFX_STDAFX_H__C914C8D4_56EB_44CD_AE77_600C6D941BA2__INCLUDED_)

 
 
2error C2011: 'DataTypeEnum' : 'enum' type redefinition解決方法
2009-06⑵6 17:36

1>------ 已啟動(dòng)生成: 項(xiàng)目: iotser, 配置: Debug Win32 ------
1>正在編譯...
1>iotser.cpp
1>f:c++ proiocptserdebugmsado15.tlh(228) : error C2011: “LockTypeEnum”: “enum”類型重定義
1>        c:program filesmicrosoft sdkswindowsv6.0aincludedbdaoint.h(109) : 參見“LockTypeEnum”的聲明
1>f:c++ proiocptserdebugmsado15.tlh(276) : error C2011: “DataTypeEnum”: “enum”類型重定義
1>        c:program filesmicrosoft sdkswindowsv6.0aincludedbdaoint.h(138) : 參見“DataTypeEnum”的聲明
1>f:c++ proiocptserdebugmsado15.tlh(321) : error C2011: “FieldAttributeEnum”: “enum”類型重定義
1>        c:program filesmicrosoft sdkswindowsv6.0aincludedbdaoint.h(127) : 參見“FieldAttributeEnum”的聲明
1>f:c++ proiocptserdebugmsado15.tlh(343) : error C2011: “EditModeEnum”: “enum”類型重定義
1>        c:program filesmicrosoft sdkswindowsv6.0aincludedbdaoint.h(83) : 參見“EditModeEnum”的聲明
1>f:c++ proiocptserdebugmsado15.tlh(352) : error C2011: “RecordStatusEnum”: “enum”類型重定義
1>        c:program filesmicrosoft sdkswindowsv6.0aincludedbdaoint.h(341) : 參見“RecordStatusEnum”的聲明
1>f:c++ proiocptserdebugmsado15.tlh(616) : error C2011: “ParameterDirectionEnum”: “enum”類型重定義
1>        c:program filesmicrosoft sdkswindowsv6.0aincludedbdaoint.h(326) : 參見“ParameterDirectionEnum”的聲明
1>f:c++ proiocptseriocptser.cpp(18) : error C2871: “ADODB”: 具有該名稱的命名空間不存在
1>生成日志保存在“file://f:C++ proiocptserDebugBuildLog.htm”
1>iocptser - 7 個(gè)毛病,0 個(gè)正告
========== 生成: 成功 0 個(gè),失敗 1 個(gè),最新 0 個(gè),跳過 0 個(gè) ==========


后來經(jīng)過在csdn上的搜索發(fā)現(xiàn)有下面兩種辦法來解決這個(gè)問題

1)

#pragma warning(disable:4146)
#import "C:Program FilesCommon FilesSystemADOmsado15.dll" named_guids rename("EOF","adoEOF"), rename("BOF","adoBOF")
#pragma warning(default:4146)
using namespace ADODB;

2)

#pragma warning(disable:4146)
#import "C:Program FilesCommon FilesSystemadomsado15.dll"
no_namespace
rename("EOF","adoEOF") rename("DataTypeEnum","adoDataTypeEnum")
rename("FieldAttributeEnum", "adoFielAttributeEnum") rename("EditModeEnum", "adoEditModeEnum")
rename("LockTypeEnum", "adoLockTypeEnum") rename("RecordStatusEnum", "adoRecordStatusEnum")
rename("ParameterDirectionEnum", "adoParameterDirectionEnum")

生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對(duì)您的學(xué)習(xí)有所幫助,可以手機(jī)掃描二維碼進(jìn)行捐贈(zèng)
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關(guān)閉
程序員人生
主站蜘蛛池模板: 成人欧美视频在线观看播放 | 日韩成人免费aa在线看 | 欧美hdxxx| 国产最新精品视频 | 国产婷婷一区二区在线观看 | 毛片免费观看网址 | 色婷婷成人 | 国产亚洲精品欧美一区 | 亚洲欧美国产另类视频 | 成人欧美精品久久久久影院 | 亚洲国产片 | 最近中文字幕完整国语 | 日韩视频高清 | 久久亚洲欧美综合激情一区 | 久久国产精品免费一区二区三区 | 亚洲国产视频在线观看 | 亚洲图片自拍偷拍 | 国产综合视频 | 欧美v片 | 一区二区三区亚洲视频 | 91精品国产91热久久p | 免费精品国产福利片 | 午夜精品久久久久久 | 欧美另类亚洲 | 特级aav毛片日本免费视频 | 免费国产福利 | 男女视频免费 | 精品国产一区二区三区久 | xxxx 欧美| 亚洲免费人成在线视频观看 | 成人毛片一区二区三区 | 日本三区视频 | 国产或人精品日本亚洲77美色 | 女人l8毛片a一级毛片 | 欧美日韩一区二区高清视 | 在线观看www. | 国产美女激情 | 久久久久avav久久久 | 日本xxxx黑人| 日本另类图片 | 亚洲在线视频 |