Add-Ons & Services

WINDOWS.H already included. MFC apps must not #include <wind

A general discussion forum.
Posts: 7
Joined: 10 Aug 2011, 19:17

WINDOWS.H already included. MFC apps must not #include <wind

Postby asiflse2 » 15 Aug 2011, 11:50


I am having to use MFC in my project. Including these files:

//#include "Poco/Logger.h"
//#include "Poco/LoggingFactory.h"
//#include "Poco/Message.h"
//#include "Poco/EventLogChannel.h"
//#include "Poco/Net/HostEntry.h"
//#include "Poco/Net/DNS.h"

in my header gives me this error "WINDOWS.H already included ...". List of files that compiler includes showed that Poco includes Windows.h and there is some unWindows.h as well. Commenting out all poco headers and Poco code got the whole thing built successfully. Any idea what is going on? Basically, I have isolated MFC in a library but due to some Microsoft Visual C++ 2010 bugs have to include the MFC related headers in my primary header and doing that give me this error. I want to use Poco - I am using it for logging and getting the IP. I certainly appreciate your help. Best regards, Asif

Posts: 1182
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: WINDOWS.H already included. MFC apps must not #include <

Postby guenter » 16 Aug 2011, 06:27

Make sure to include the MFC headers before any POCO headers.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest