Windows.h已包含 [英] Windows.h already included

查看:224
本文介绍了Windows.h已包含的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在写Win32 dll.我包括了一个可以访问数据库操作的类.我在头文件中包含了afxdb.h,并在CDatabase的头文件中声明了一个变量.

当我编译时,它给我一个 windows.h已经包含的错误. MFC应用程序不得#include< windows.h> ;;
当我尝试将其包含在.cpp文件中(在stdafx.h下面)时,它也相同,并且编译时没有错误.

Hey All,

I am writing a Win32 dll. I included a class that can access database operations. I included afxdb.h in the headerfile and declared a variable in the header file for CDatabase.

When I compile, it gives me a error that windows.h already included. MFC apps must not #include <windows.h>;
Same when I try to include it in the .cpp file (below stdafx.h) it compiles without error.

Can any one help me around this please?

推荐答案

您已经在C/C ++/MFC论坛中提出了这个问题.是什么让您认为再次在这里提出要求会帮助任何人?
You have already asked this question in the C/C++/MFC forum. What makes you think that asking it again here will help anyone?


这篇关于Windows.h已包含的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆