Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 11-Dec-11 23:07pm
v3

1 solution

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.
C#
#if !defined(MYCLASS_H)
#define MYCLASS_H

// TODO

#enfif
 
Share this answer
 
Comments
chaiein 28-Feb-12 5:00am    
where should this be included? even i have this problem.
LaxmikantYadav 3-Mar-12 4:35am    
In Header File.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900