> 1. Global variables: critical > I compiled the code (ie: MUtilities.cxx) using the R__EXTERN macro and > compilation is fine Actually you should use R__EXTERN in an header file (for other compilation unit) and 'declare' the global variable without the R__EXTERN in one of the cxx file. > 2. Circular dependencies: important There is a couple of solutions. In the following I assume that you have 4 files: file1.C file1.h, file2.C and file2.h You need to create a 5th file: // lib.C #include "file1.C" #include "file2.C" // end of lib.C and use it: root [] .L lib.C+ root [] .L file1.h+ root [] .L file2.h+ Or you can use a more elaborate lib.C file: // lib.C #include "file1.C" #include "file2.C" #ifdef __CINT__ #pragma link C++ class myclass1+; #pragma link C++ class myclass2+; // and any other pragma statements that are needed #endif // end of lib.C and use it: root [] .L lib.C+ > 3. Default Webbrowser: enhancement We are working toward making the THtml documentation available at run-time. Cheers Philippe -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Martijn Schellekens Sent: Monday, February 09, 2004 8:05 AM To: roottalk@pcroot.cern.ch Subject: [ROOT] Several question: globals in aclic, circular dependencies in aclic, default webbrowser Hi Rooters, I encoutered three problems this weekend, and I desperately need some help. 1. Global variables: critical I tried to compile several scripts this weekend that used global variables. The global variable was for example a TString gWorkspaceDirectory that does exist in my gROOT according to GetListOfGlobals() (it is defined in my rootalias.C) I compiled the code (ie: MUtilities.cxx) using the R__EXTERN macro and compilation is fine (as a matter of fact i use ACLiC) I created the header MUtilities_linkdef.h that is detected and integrated by the compilation procedure as gDebug=6 tells me I wrote #pragma link C++ global gWorkspaceDirectory in my linkdef file. Yet once the script is loading it returns it can not identify gWorkspaceDirectory. What do I wrong or where can I find documentation that explains simply what to do? 2. Circular dependencies: important I have two source files that are strongly related. The header files are sufficient for compiling yet once compiled with ACLiC they can not be loaded as they depend on each other and they can not be loaded simultaneously. Is there a simple way using ACLiC to compiling and loading those interdependent source files? 3. Default Webbrowser: enhancement Documentation related to my userinterface is in html (by the way thanks for the excellent THtml class) and it would be nice for the users to simply press on a button so it opens. Is there a methos within root that could return the default internet browser (on both linux, windows and macOS)? I thanks in advance anybody that could help me on any of those questions. Martijn Schellekens
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET