Re: use of '#define FOO' in macro

From: OKUMURA, Akira <oxon_at_icrr.u-tokyo.ac.jp>
Date: Wed, 23 May 2007 05:00:11 -1000


Hello ROOTers,

I found an old post in roottalk.
http://root.cern.ch/root/roottalk/roottalk98/2493.html I tried this but I still get 'Error: Symbol SHORT_IMG is ...'.

I added
#defined SHORT_IMG 16
in FITSfunction.h, and
#pragma link C++ global SHORT_IMG;
in FITSLinkDef.h .

These two headers correspond to CERNfunction.h and CERNLinkDef.h (see http://root.cern.ch/root/HowtoCERNLIB.html)

Sincerely

OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
Institute for Cosmic Ray Research, University of Tokyo 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan Phone/Fax : +81 4-7136-3153
Skype : okumura.akira

On 2007/05/22, at 17:44, OKUMURA, Akira wrote:

> Hello ROOTers
>
> I compiled my original ROOT according to the web page
> http://root.cern.ch/root/HowtoCERNLIB.html
> It was compiled with the library CCfits (C++ FITS library).
>
> One of its headers has some #define lines such as
> #define BYTE_IMG 8
> #define SHORT_IMG 16
> #define LONG_IMG 32
>
> If I use these constants in my macro, I get an error.
> root [0] .x test.C
> Error: Symbol SHORT_IMG is not defined in current scope cookbook.C:
> 114:
> *** Interpreter error recovered ***
>
> but
> root [0] .x test.C+
> runs as I expected.
>
> Is it possible to use #define constants of the library in my macro
> without compiling? Is there any solution?
>
> Sincerely
>
> OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
> Institute for Cosmic Ray Research, University of Tokyo
> 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan
> Phone/Fax : +81 4-7136-3153
> Skype : okumura.akira
>
>
Received on Wed May 23 2007 - 17:00:50 CEST

This archive was generated by hypermail 2.2.0 : Fri May 25 2007 - 17:50:01 CEST