Gecko-MFC:#error WINDOWS.H已包含. MFC应用程序不得#include [英] Gecko-MFC: #error WINDOWS.H already included. MFC apps must not #include

查看:272
本文介绍了Gecko-MFC:#error WINDOWS.H已包含. MFC应用程序不得#include的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我正在为Mozilla Firefox开发插件,我使用Visual C ++ 2008和Gecko引用了以下内容:

https://developer.mozilla.org/en/Compiling Visual Studio中的npruntime示例插件 [ #error WINDOWS.H已包含. MFC应用程序不得#include< windows.h>
请帮助我
感谢

Hi all
I am developing an Plugin for Mozilla Firefox, I use Visual C++ 2008 and Gecko that reference from:

https://developer.mozilla.org/en/Compiling The npruntime Sample Plugin in Visual Studio[^]
I want to use some function of MFC as: CArray, CString,.. then i must include some header of it and complile, ie. #include "afxtempl.h" , but i have an error as following:
#error WINDOWS.H already included. MFC apps must not #include <windows.h>
please help me
Thanks

推荐答案

由于嵌套或多次包含相同的头文件,导致出现此问题.为了避免这种情况,请在所有源代码文件中跟随micro.
This problem occurs due to nested or mutiple time inclusion of same header file. To avoid this use following micro in all source code file.
#if !defined(MYCLASS_H)
#define MYCLASS_H

// TODO

#enfif


这篇关于Gecko-MFC:#error WINDOWS.H已包含. MFC应用程序不得#include的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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