[Gate-users] Analyze.cpp compiling problem

Barbara Genocchi Barbara.Genocchi at icr.ac.uk
Tue Jul 12 12:22:25 CEST 2016


Dear all (again),


I hope you will help me also with the following problem.


I'm trying to compile Analyze.cpp (you can find it in Gate/examples/example_CT/classic) with the following command:


g++ -O3 `root-config --cflags --glibs` AnalyzeCT.cpp -o AnalyzeCT

​

and this is the error:


/tmp/ccHTCz2B.o: In function `TApplicationImp::IsA() const':
AnalyzeCT.cpp:(.text._ZNK15TApplicationImp3IsAEv[_ZNK15TApplicationImp3IsAEv]+0x1): undefined reference to `TApplicationImp::Class()'
/tmp/ccHTCz2B.o: In function `TCanvasImp::IsA() const':
AnalyzeCT.cpp:(.text._ZNK10TCanvasImp3IsAEv[_ZNK10TCanvasImp3IsAEv]+0x1): undefined reference to `TCanvasImp::Class()'
/tmp/ccHTCz2B.o: In function `int TTree::SetBranchAddress<float>(char const*, float*, TBranch**)':
AnalyzeCT.cpp:(.text._ZN5TTree16SetBranchAddressIfEEiPKcPT_PP7TBranch[_ZN5TTree16SetBranchAddressIfEEiPKcPT_PP7TBranch]+0x23): undefined reference to `TClass::GetClass(std::type_info const&, bool, bool)'
AnalyzeCT.cpp:(.text._ZN5TTree16SetBranchAddressIfEEiPKcPT_PP7TBranch[_ZN5TTree16SetBranchAddressIfEEiPKcPT_PP7TBranch]+0x6b): undefined reference to `TDataType::GetType(std::type_info const&)'
/tmp/ccHTCz2B.o: In function `int TTree::SetBranchAddress<int>(char const*, int*, TBranch**)':
AnalyzeCT.cpp:(.text._ZN5TTree16SetBranchAddressIiEEiPKcPT_PP7TBranch[_ZN5TTree16SetBranchAddressIiEEiPKcPT_PP7TBranch]+0x23): undefined reference to `TClass::GetClass(std::type_info const&, bool, bool)'
AnalyzeCT.cpp:(.text._ZN5TTree16SetBranchAddressIiEEiPKcPT_PP7TBranch[_ZN5TTree16SetBranchAddressIiEEiPKcPT_PP7TBranch]+0x6b): undefined reference to `TDataType::GetType(std::type_info const&)'
/tmp/ccHTCz2B.o: In function `main':
AnalyzeCT.cpp:(.text.startup+0x97): undefined reference to `TApplication::TApplication(char const*, int*, char**, void*, int)'
AnalyzeCT.cpp:(.text.startup+0xa1): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0xce): undefined reference to `TCanvas::TCanvas(char const*, char const*, int, int, int, int)'
AnalyzeCT.cpp:(.text.startup+0x100): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x11c): undefined reference to `TFile::TFile(char const*, char const*, char const*, int)'
AnalyzeCT.cpp:(.text.startup+0x224): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x25c): undefined reference to `TH2F::TH2F(char const*, char const*, int, double, double, int, double, double)'
AnalyzeCT.cpp:(.text.startup+0x266): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x2a0): undefined reference to `TH2F::TH2F(char const*, char const*, int, double, double, int, double, double)'
AnalyzeCT.cpp:(.text.startup+0x2aa): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x2d4): undefined reference to `TH1F::TH1F(char const*, char const*, int, double, double)'
AnalyzeCT.cpp:(.text.startup+0x2de): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x30d): undefined reference to `TH1F::TH1F(char const*, char const*, int, double, double)'
AnalyzeCT.cpp:(.text.startup+0x317): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x346): undefined reference to `TH1F::TH1F(char const*, char const*, int, double, double)'
AnalyzeCT.cpp:(.text.startup+0x350): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x37f): undefined reference to `TH1F::TH1F(char const*, char const*, int, double, double)'
AnalyzeCT.cpp:(.text.startup+0x389): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x3b5): undefined reference to `TH1F::TH1F(char const*, char const*, int, double, double)'
AnalyzeCT.cpp:(.text.startup+0x3bf): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x3eb): undefined reference to `TH1F::TH1F(char const*, char const*, int, double, double)'
AnalyzeCT.cpp:(.text.startup+0x3f5): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x421): undefined reference to `TH1F::TH1F(char const*, char const*, int, double, double)'
AnalyzeCT.cpp:(.text.startup+0x42b): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x457): undefined reference to `TH1F::TH1F(char const*, char const*, int, double, double)'
AnalyzeCT.cpp:(.text.startup+0x1164): undefined reference to `gStyle'
AnalyzeCT.cpp:(.text.startup+0x1178): undefined reference to `TStyle::SetPalette(int, int*, float)'
AnalyzeCT.cpp:(.text.startup+0x117f): undefined reference to `gStyle'
AnalyzeCT.cpp:(.text.startup+0x1189): undefined reference to `TStyle::SetOptStat(char const*)'
AnalyzeCT.cpp:(.text.startup+0x1193): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x11d9): undefined reference to `TPad::TPad(char const*, char const*, double, double, double, double, short, short, short)'
AnalyzeCT.cpp:(.text.startup+0x11e3): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x1229): undefined reference to `TPad::TPad(char const*, char const*, double, double, double, double, short, short, short)'
AnalyzeCT.cpp:(.text.startup+0x1233): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x1279): undefined reference to `TPad::TPad(char const*, char const*, double, double, double, double, short, short, short)'
AnalyzeCT.cpp:(.text.startup+0x1283): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x12c9): undefined reference to `TPad::TPad(char const*, char const*, double, double, double, double, short, short, short)'
AnalyzeCT.cpp:(.text.startup+0x12d3): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x1319): undefined reference to `TPad::TPad(char const*, char const*, double, double, double, double, short, short, short)'
AnalyzeCT.cpp:(.text.startup+0x1323): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x1369): undefined reference to `TPad::TPad(char const*, char const*, double, double, double, double, short, short, short)'
AnalyzeCT.cpp:(.text.startup+0x1373): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x13b9): undefined reference to `TPad::TPad(char const*, char const*, double, double, double, double, short, short, short)'
AnalyzeCT.cpp:(.text.startup+0x13c3): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x1407): undefined reference to `TPad::TPad(char const*, char const*, double, double, double, double, short, short, short)'
AnalyzeCT.cpp:(.text.startup+0x1411): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x1455): undefined reference to `TPad::TPad(char const*, char const*, double, double, double, double, short, short, short)'
AnalyzeCT.cpp:(.text.startup+0x145f): undefined reference to `TStorage::ObjectAlloc(unsigned long)'
AnalyzeCT.cpp:(.text.startup+0x14a3): undefined reference to `TPad::TPad(char const*, char const*, double, double, double, double, short, short, short)'
AnalyzeCT.cpp:(.text.startup+0x16b1): undefined reference to `TH1::GetXaxis() const'
AnalyzeCT.cpp:(.text.startup+0x1718): undefined reference to `TH1::GetXaxis() const'
AnalyzeCT.cpp:(.text.startup+0x177f): undefined reference to `TH1::GetXaxis() const'
AnalyzeCT.cpp:(.text.startup+0x17e6): undefined reference to `TH1::GetXaxis() const'
AnalyzeCT.cpp:(.text.startup+0x184a): undefined reference to `TH1::GetXaxis() const'
/tmp/ccHTCz2B.o:AnalyzeCT.cpp:(.text.startup+0x18ab): more undefined references to `TH1::GetXaxis() const' follow
/tmp/ccHTCz2B.o: In function `main':
AnalyzeCT.cpp:(.text.startup+0x19a9): undefined reference to `TApplication::Run(bool)'
AnalyzeCT.cpp:(.text.startup+0x1a0a): undefined reference to `TApplication::~TApplication()'
AnalyzeCT.cpp:(.text.startup+0x1cb9): undefined reference to `TObject::operator delete(void*)'
AnalyzeCT.cpp:(.text.startup+0x1d1a): undefined reference to `TApplication::~TApplication()'
AnalyzeCT.cpp:(.text.startup+0x1d2f): undefined reference to `TObject::operator delete(void*)'
AnalyzeCT.cpp:(.text.startup+0x1dc2): undefined reference to `TObject::operator delete(void*)'
AnalyzeCT.cpp:(.text.startup+0x1dd2): undefined reference to `TObject::operator delete(void*)'
AnalyzeCT.cpp:(.text.startup+0x1e3c): undefined reference to `TObject::operator delete(void*)'
AnalyzeCT.cpp:(.text.startup+0x1e4c): undefined reference to `TObject::operator delete(void*)'
/tmp/ccHTCz2B.o:AnalyzeCT.cpp:(.text.startup+0x1ea6): more undefined references to `TObject::operator delete(void*)' follow
/tmp/ccHTCz2B.o: In function `_GLOBAL__sub_I_main':
AnalyzeCT.cpp:(.text.startup+0x31): undefined reference to `TVersionCheck::TVersionCheck(int)'
/tmp/ccHTCz2B.o: In function `TApplicationImp::~TApplicationImp()':
AnalyzeCT.cpp:(.text._ZN15TApplicationImpD2Ev[_ZN15TApplicationImpD5Ev]+0xc): undefined reference to `TString::~TString()'
/tmp/ccHTCz2B.o: In function `TApplicationImp::~TApplicationImp()':
AnalyzeCT.cpp:(.text._ZN15TApplicationImpD0Ev[_ZN15TApplicationImpD0Ev]+0x10): undefined reference to `TString::~TString()'
/tmp/ccHTCz2B.o:(.rodata._ZTV15TApplicationImp[_ZTV15TApplicationImp]+0x78): undefined reference to `TApplicationImp::ShowMembers(TMemberInspector&)'
/tmp/ccHTCz2B.o:(.rodata._ZTV15TApplicationImp[_ZTV15TApplicationImp]+0x80): undefined reference to `TApplicationImp::Streamer(TBuffer&)'
/tmp/ccHTCz2B.o:(.rodata._ZTV10TCanvasImp[_ZTV10TCanvasImp]+0xf8): undefined reference to `TCanvasImp::ShowMembers(TMemberInspector&)'
/tmp/ccHTCz2B.o:(.rodata._ZTV10TCanvasImp[_ZTV10TCanvasImp]+0x100): undefined reference to `TCanvasImp::Streamer(TBuffer&)'
collect2: error: ld returned 1 exit status​


it seems it is not able to find out the root libraries....


Does anyone could help me?


Barbara

The Institute of Cancer Research: Royal Cancer Hospital, a charitable Company Limited by Guarantee, Registered in England under Company No. 534147 with its Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the addressee only.  If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer and network.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20160712/c48a24ab/attachment-0001.html>


More information about the Gate-users mailing list