I am trying to use CDatabase and for that I have declared <afxdb.h>
in stdafx.h file.
When I compile this code I get an error "WINDOWS.H already included. MFC apps must not #include <windows.h>
". Why does this happen? Isn't this the right header file to use CDatabase?
This is the default generated code...
#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>
If I add #include <afxdb.h>
after #include <tchar.h
> I get the error specified.
Thank You