1 Jun 2007 14:53
Re: [ROOT] use of '#define FOO' in macro
Axel Naumann <Axel.Naumann <at> cern.ch>
2007-06-01 12:53:21 GMT
2007-06-01 12:53:21 GMT
Hi, sorry for the slow reply! -p invokes the external preprocessor - all preprocessor macros will already be expanded when CINT sees your code. It will thus not be able to use it. Instead, do not use -p, and instead use the following hack. Put in your Linkdef.h: extern const bool b1; #pragma link C++ global b1; This way, CINT will know that b1 is a variable. And you don't have to change the CCfits header files. Cheers, Axel. OKUMURA, Akira wrote: > Hello ROOTers, > > '-p' option given to rootcint seems to prevent my code from using global > macro. I wrote simple test codes which had some '#define' constants and > compiled them using '-p' option of rootcint. I could not access such > constants from interpreter but I could do it if I delete '-p'. > > However in my original code which was linked to CCFITS needs '-p' > because a declaration of bool in its header cannot be handled by CINT > correctly. > (see http://root.cern.ch/root/roottalk/roottalk06/1562.html) > > Any suggestion?(Continue reading)
RSS Feed