FW: [omniORB] compilation problems with MFC and omniORB301

Sai-Lai Lo S.Lo@uk.research.att.com
25 Sep 2000 12:15:11 +0100


Try adding a #undef _T in your code.

e.g.

#include <afxwin.h>
#ifdef _T
#undef _T
#endif
#include <myidl.hh>

Sai-Lai


>>>>> Raf Vreys writes:

>> -----Original Message-----
>> From:	Raf Vreys 
>> Sent:	Monday, September 25, 2000 11:05 AM
>> To:	'Eric Callier'
>> Subject:	RE: [omniORB] compilation problems with MFC and omniORB301
>> 
>> hi Eric,
>> 
>> I've been struggling with the same _T: It's being defined in the
>> "../VC98/INCLUDE/TCHAR.H", which is being included through "include
>> <atlbase.h>" in your "stdafx.h".
>> If you insert your include "your-generated-header-corba.hh" just before
>> the "include <atlbase.h>" it will compile.
>> 
>> Another way is to build a standalone library for corba in such way that
>> mfc doesn't need to be included. The standalone corba-library is then
>> being linked into your mfc-project.
>> 
>> enjoy, Raf. 
>> 
>> -----Original Message-----
>> From:	Eric Callier [SMTP:eric.callier@elftrading.com]
>> Sent:	Sunday, September 24, 2000 11:11 AM
>> To:	omniorb-list@uk.research.att.com
>> Subject:	[omniORB] compilation problems with MFC and omniORB301
>> 
>> 
>> In my sources when I include first afxwin.h I've got the following
>> compilation error:
>> 
>> error "Name conflict: _T is defined as a macro in a header file
>> included before this."
>> 
>> And when I invert the include statements with omniORB headers I've got the
>> following error:
>> 
>> error WINDOWS.H already included.  MFC apps must not #include
>> <windows.h>
>> 
>> 
>> Is anyone has an Idea to solve my problem ?
>> 

-- 
Sai-Lai Lo                                   S.Lo@uk.research.att.com
AT&T Laboratories Cambridge           WWW:   http://www.uk.research.att.com 
24a Trumpington Street                Tel:   +44 1223 343000
Cambridge CB2 1QA                     Fax:   +44 1223 313542
ENGLAND