Re: Using TMapFiles in compiled code

Valery Fine (fine@bnl.gov)
Fri, 10 Jul 1998 14:40:04 -0500


On 10 Jul 98 at 12:54, Peter Steinberg wrote:

>
> However, the compiler (VC++5.0) complains even before it finished
> dealing with TMapFile.h:
>
> d:\Root_star\include\TMapFile.h(150): error C2039: 'GetObject' :
> is not a member of 'TObjLink'
>
> What am I doing wrong here? When I look in TList.h I see that
> GetObject _is_ a member of TObjLink. Do I need to include more
> files?
>

!!!!! Look up "Windows4Root.h" !!!!!

The problem is that

GetObject

is defined as

cpp MACRO (!!!)

within some VC++ header files. To see what happens behind the
scene you may try too see the output of the cpp just before
the "real" compilation.

That "Windows4Root.h" contains the list of "undef" tricks to avoid
clashes between Root names and Microsoft WIN32 API macro names.

Valery
=================================================================
Dr. Valeri Faine (Fine)
------------------- Phone: +1 516 344 7806
Brookhaven National Laboratory FAX : +1 516 344 4206
Bldg. 510A /STAR mailto:fine@bnl.gov
Upton, New York, 11973-5000 http://nicewww.cern.ch/~fine
USA

Dr. Valery Fine Telex : 911621 dubna su
-----------
LCTA/Joint Inst.for Nuclear Res. Phone : +7 09621 6 40 80
141980 Dubna, Moscow region Fax : +7 09621 6 51 45
Russia mailto:fine@main1.jinr.dubna.su