I have a Visual Studio 6.0 project that uses SQL Compact Server. I'm trying to update the solution to use on Visual Studio 2012, but i have the following error:
fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
My stdafx.h includes winsock2.h, who have this:
#ifndef _INC_WINDOWS
#include <windows.h>
#endif /* _INC_WINDOWS */
There is a way to supress the error? How do I proceed? When I remove the windows.h of the files that include it indirectly, I got error C2011: 'IRowsetBookmark' : 'struct' type redefinition
I already saw other questions here about this error, but none of suggestions works for me.
- update:
I solve the error C2011: 'IRowsetBookmark' : 'struct' type redefinition
adding the following lines in the top of my stdafx.h:
#if !defined(__IRowsetBookmark_INTERFACE_DEFINED__)
#define __IRowsetBookmark_INTERFACE_DEFINED__
#endif
#if !defined(__IRowsetBookmark_FWD_DEFINED__)
#define __IRowsetBookmark_FWD_DEFINED__
#endif
But i got error C2143: syntax error : missing ',' before '<'
On those line:
class CArrayRowset :
public CVirtualBuffer<T>,
public TRowset
{
Is it possible that adding that lines on my stdfx.h i messed up some class declaration?