我正在尝试使用 CDatabase,为此我已<afxdb.h>
在 stdafx.h 文件中声明。当我编译此代码时,我收到错误“WINDOWS.H 已包含。MFC 应用程序不得#include <windows.h>
”。为什么会这样?这不是使用 CDatabase 的正确头文件吗?这是默认生成的代码...
#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
如果我在 >#include <afxdb.h>
之后添加,#include <tchar.h
我会得到指定的错误。
谢谢你