FW: [omniORB] compilation problems with MFC and omniORB301

Arjen.vander.Veen@Infopulse.nl Arjen.vander.Veen@Infopulse.nl
Mon, 25 Sep 2000 15:17:16 +0200


what I did was:
#include <afxwin.h>
#undef _T
#include <omniORB3\corba.h>
#include "myheaders.hxx"
#define _T	_TEXT		// these two macros are identical

Arjen

> -----Original Message-----
> From: Sai-Lai Lo [mailto:S.Lo@uk.research.att.com]
> Sent: Monday, September 25, 2000 13:15 PM
> To: omniorb-list@uk.research.att.com
> Cc: Eric Callier; Raf.Vreys@mmr.be
> Subject: Re: FW: [omniORB] compilation problems with MFC and 
> omniORB301
> 
> 
> 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