I am having following problem (errors) while compiling my code in root 6.08, was working fine in root 5.34/36.
root [0] .L BCR_PDF.C+
Info in TUnixSystem::ACLiC: creating shared library /home/iwsatlas1/ritu/highxp/./BCR_PDF_C.so
cling::DynamicLibraryManager::loadLibrary(): /home/iwsatlas1/ritu/highxp/BCR_PDF_C.so: undefined symbol: _ZTI7BCR_PDF
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/…/…/…/…/lib64/crt1.o: In function _start': (.text+0x20): undefined reference tomain’
/home/iwsatlas1/ritu/highxp/BCR_PDF_C_ACLiC_dict.o: In function ROOT::GenerateInitInstanceLocal(BCR_PDF const*)': BCR_PDF_C_ACLiC_dict.cxx:(.text+0xfe): undefined reference totypeinfo for BCR_PDF’
/home/iwsatlas1/ritu/highxp/BCR_PDF_C_ACLiC_dict.o: In function BCR_PDF::BCR_PDF()': BCR_PDF_C_ACLiC_dict.cxx:(.text._ZN7BCR_PDFC2Ev[_ZN7BCR_PDFC5Ev]+0x1f): undefined reference tovtable for BCR_PDF’
collect2: error: ld returned 1 exit status
But now if I include these files in a simple .C and .h files created using MakeClass, it is not compiling and giving following errors, it use to somehow work in earlier versions.
Could you please have a look?
the errors are:
/home/iwsatlas1/ritu/NewRoot_workingDir/BCR_PDF.h:74:3: error: redefinition of 'R__dummyintdefault74'
ClassImp(BCR_PDF);
^
/opt/root/include/Rtypes.h:279:24: note: expanded from macro 'ClassImp'
#define ClassImp(name) ClassImpUnique(name,default)
^
/opt/root/include/Rtypes.h:274:21: note: expanded from macro 'ClassImpUnique'
static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) = \
^
/opt/root/include/RConfig.h:423:27: note: expanded from macro '_R__UNIQUE_'
# define _R__UNIQUE_(X) _R__JOIN_(X,__LINE__)
^
/opt/root/include/RConfig.h:418:27: note: expanded from macro '_R__JOIN_'
# define _R__JOIN_(X,Y) _NAME2_(X,Y)
^
/opt/root/include/RConfig.h:400:33: note: expanded from macro '_NAME2_'
# define _NAME2_(name1,name2) name1##name2
^
<scratch space>:36:1: note: expanded from here
R__dummyintdefault74
^
/home/iwsatlas1/ritu/NewRoot_workingDir/BCR_PDF.h:74:3: note: previous definition is here
ClassImp(BCR_PDF);
^
/opt/root/include/Rtypes.h:279:24: note: expanded from macro 'ClassImp'
#define ClassImp(name) ClassImpUnique(name,default)
^
/opt/root/include/Rtypes.h:274:21: note: expanded from macro 'ClassImpUnique'
static int _R__UNIQUE_(_NAME2_(R__dummyint,key)) = \
^
/opt/root/include/RConfig.h:423:27: note: expanded from macro '_R__UNIQUE_'
# define _R__UNIQUE_(X) _R__JOIN_(X,__LINE__)
^
/opt/root/include/RConfig.h:418:27: note: expanded from macro '_R__JOIN_'
# define _R__JOIN_(X,Y) _NAME2_(X,Y)
^
/opt/root/include/RConfig.h:400:33: note: expanded from macro '_NAME2_'
# define _NAME2_(name1,name2) name1##name2
^
<scratch space>:26:1: note: expanded from here
R__dummyintdefault74
^
//========================================================
Also if I just comment out ClassImp(BCR_PDF) line in BCR_PDF.h file, it atleast compiles, but is there
But I got the errors after I did
.L highx_p.C+
//================================================================
Info in TUnixSystem::ACLiC: creating shared library /home/iwsatlas1/ritu/NewRoot_workingDir/./highx_p_C.so
cling::DynamicLibraryManager::loadLibrary(): /home/iwsatlas1/ritu/NewRoot_workingDir/highx_p_C.so: undefined symbol: _ZN7BCR_PDF8StreamerER7TBuffer
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/…/…/…/…/lib64/crt1.o: In function _start': (.text+0x20): undefined reference tomain’
/home/iwsatlas1/ritu/NewRoot_workingDir/highx_p_C_ACLiC_dict.o: In function BCR_PDF::IsA() const': highx_p_C_ACLiC_dict.cxx:(.text._ZNK7BCR_PDF3IsAEv[_ZNK7BCR_PDF3IsAEv]+0xd): undefined reference toBCR_PDF::Class()’
/home/iwsatlas1/ritu/NewRoot_workingDir/highx_p_C_ACLiC_dict.o: In function BCR_PDF::ShowMembers(TMemberInspector&) const': highx_p_C_ACLiC_dict.cxx:(.text._ZNK7BCR_PDF11ShowMembersER16TMemberInspector[_ZNK7BCR_PDF11ShowMembersER16TMemberInspector]+0x11): undefined reference toBCR_PDF::Class()’
/home/iwsatlas1/ritu/NewRoot_workingDir/highx_p_C_ACLiC_dict.o:(.data.rel.ro._ZTV7BCR_PDF[_ZTV7BCR_PDF]+0x1d8): undefined reference to `BCR_PDF::Streamer(TBuffer&)’
collect2: error: ld returned 1 exit status
//========================
And if I load BCR_PDF.C via .L BCR_PDF.C+
I get errors stating redefinition of every function that is in BCR_PDF