Hi, ACLiC does not use the #defines declared to CINT. Instead you need to manipulate the ACLiC command line. For example you could do: TString cmd = gSystem->GetMakeSharedLib(); cmd.ReplaceAll("$IncludePath","$IncludePath -DMYMACRO"); gSystem->SetMakeSharedLib(); Another (better?) solution is to add a #include to your scripts. You could create a file // mymacrodef.h #define MYMACRO and add #include "mymacrodef.h" to each scripts. The advantage of this method is that if, for some reason, you want to switch the value of MYMACRO (or turn it off), you can just change mymacrodef.h and the ACLiC dependency resolution can pick-up that it needs to rebuild the libraries. Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Ruben Shahoian Sent: Wednesday, September 24, 2003 7:06 AM To: roottalk@cern.ch Subject: [ROOT] #define macro for ACLIC? Hello, is there a way to #define MACRO for the whole root session, so that ACLIC sees it? Since I need it to bypass some machine dependent behaviour, I would prefer to have it defined for any macro compiled, and not to put it explicitly in each macro. Doing in the beginning of the session .{#define MYMACRO} leads to "MYMACRO is not defined" for the code below void tst() { #ifdef MYMACRO printf("MYMACRO is defined\n"); #else printf("MYMACRO is not defined\n"); #endif // } Regards, Ruben --
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET