Visual C ++ 2008,#include“ afxdb.h”时出错

| 我在使用adxdb.h时遇到了麻烦: 我尝试过了
#include \"afxdb.h\"
但是我收到了这个错误:   C:\\ Program Files \\ Microsoft Visual Studio 9.0 \\ VC \\ atlmfc \\ include \\ afx.h(24):致命错误C1189:#error:使用/ MD [d]构建MFC应用程序(CRT dll版本)需要MFC共享dll版本。请#define _AFXDLL或不使用/ MD [d] 然后我加了
#define _AFXDLL
正如错误消息所告诉的,并得到了很多错误:   C:\\ Program Files \\ Microsoft Visual Studio 9.0 \\ VC \\ atlmfc \\ include \\ afxole.h(1455):错误C2504:\'CControlBar \':未定义基类1> C:\\ Program Files \\ Microsoft Visual Studio 9.0 \\ VC \\ atlmfc \\ include \\ afxole.h(1470):错误C2146:语法错误:标识符\'m_tracker \'前缺少\'; \'   1> C:\\ Program Files \\ Microsoft Visual Studio 9.0 \\ VC \\ atlmfc \\ include \\ afxole.h(1470):错误C4430:缺少类型说明符-假定为int。注意:C ++不支持default-int   1> C:\\ Program Files \\ Microsoft Visual Studio 9.0 \\ VC \\ atlmfc \\ include \\ afxole.h(1470):错误C4430:缺少类型说明符-假定为int。注意:C ++不支持default-int   1> C:\\ Program Files \\ Microsoft Visual Studio 9.0 \\ VC \\ atlmfc \\ include \\ afxpriv.h(590):错误C2504:\'CControlBar \':未定义基类 关于如何解决此问题的任何想法? 附言我是Visual C ++的新手     
已邀请:
        不要直接添加ѭ2,而是通过项目配置设置间接添加ѭ2。配置属性|一般使用MFC,并确保在“共享DLL”中将其设置为“使用MFC”。     
        要解决该问题,您需要打开“项目”->“属性”->“配置属性”>“生成”->“使用MFC”:在共享DLL中使用MFC。 (Visual Studio 2013) 而且您会幸福的!     
        我有同样的问题,要解决这个问题,我必须确保:
#include <afxcmn.h>
在之前:
#include <afxdb.h>
所以:
#include <afxcmn.h>
#include <afxdb.h>
很好并且:
#include <afxdb.h>
#include <afxcmn.h>
不好。     

要回复问题请先登录注册