Prblem with cint for dictionnary genration

Hi,
I use both Root and Geant4 with the G4UIRoot graphical interface for Geant4.
There are five files : G4UIRoot (main), G4RootMainFrame, G4RootTextFrame, G4RootTitleFrame, G4RootCommandFrame. The cint dictionnary G4UIRootDict is already made. I want to add my own class G4RunText with slots, so this slots must be known in G4UIRootDict.
So in the header file i put ClassDef(G4RunText,0), in the source file ClassImpQ(G4RunText) and #pragma link C++ class G4RunText in G4UIRootLinkDef.hh file. I also add the name of the header file in the GNUMakefile. When I compile i get the following error message :
[courtine@clrpc167 ROOT]$ gmake
Making Root Dictionary…
Dans le fichier inclus à partir de …/include/G4RunText.hh:12,
à partir de /tmp/filetE8V1l_rootcint.h:3,
à partir de /tmp/L7UUNQ_cint.cxx:1:
…/include/G4UIRoot.hh:10:26: G4UIsession.hh: Aucun fichier ou répertoire de ce type
…/include/G4UIRoot.hh:11:28: G4VBasicShell.hh: Aucun fichier ou répertoire de ce type
…/include/G4UIRoot.hh:12:36: G4VInteractiveSession.hh: Aucun fichier ou répertoire de ce type
Error: class,struct,union or type G4VBasicShell not defined FILE:…/include/G4UIRoot.hh LINE:29
Error: class,struct,union or type G4VInteractiveSession not defined FILE:…/include/G4UIRoot.hh LINE:29
Error: Symbol G4boolexistedRint is not defined in current scope FILE:…/include/G4UIRoot.hh LINE:108
Syntax error FILE:…/include/G4UIRoot.hh LINE:114
Warning: Error occured during reading source files
Warning: Error occured during dictionary source generation
!!!Removing G4UIRootDict.cc G4UIRootDict.h !!!
Error: rootcint: error loading headers…
gmake: *** [src/G4UIRootDict.cc] Erreur 1
I don’t understand because before i made this changes the programm runs very welll. Besides, if i destroy all the changes i made and if i compile, the programm runs good!
Thanks for your help,
Fabien

Did you specify something like -IG4includepath when running rootcint?

Rene

Hi Rene,
I didn’t use any -lG4includepath when i compile. I have a file .bashrc where there are all path for Geant4 use (G4WORKDIR, G4INCLUDE …). I use only the command gmake to compile. I add the name of the class i made i the the GNUMakefile and the main so i don’t understand why cint can’t open this file.
Thanks for your help,
Fabien

Hi Rene,
I didn’t use any -lG4includepath when i compile. I have a file .bashrc where there are all path for Geant4 use (G4WORKDIR, G4INCLUDE …). I use only the command gmake to compile. I add the name of the class i made in the GNUMakefile and in the main so i don’t understand why cint can’t open this file.
Thanks for your help,
Fabien

Hi,
I understood why cint can’t open the class I add. Now the problem is when I run the code. The error message is the following :
[courtine@clrpc167 test]$ /home/courtine/geant4/bin/Linux-g++/Puits_ZM_test
/home/courtine/geant4/bin/Linux-g++/Puits_ZM_test: relocation error: /users_local1/geant4.6.2.p01/lib/Linux-g++/libG4UIROOT.so: undefined symbol: _ZN15G4RootMainFrame11ShowMembersER16TMemberInspectorPc
G4RootMainFrame isn’t the class I add, this file already exists before i add my own class and ther was no problem with compilation and running.
Thanks,
Fabien

It looks like you have a missing ClassImp statement in your implementation file.

Rene

In fact in my class i have made an include which makes troubles: in the header file i have add the two instructions :
__class G4UIRoot (the main)
__#include "G4UIRoot.hh"
If i suppress the last one, it works very well !
Thanks for your reply,
Fabien