Standalone application with ROOT 6

Hi,

I’d like to compile an old stand-alone RootGUI application against ROOT6, which still works fine for ROOT5. The build commands are:

rootcint -f gui_linkdef.cpp -c DalitzGUI.h linkdef.h
g++ `root-config --cflags --glibs` -o DalitzGUI DalitzGUI.cpp gui_linkdef.cpp

the source input files are DalitzGUI.cpp, DalitzGUI.h and KinTools.cpp, where the latter two are included in DalitzGUI.cpp with

#include "DalitzGUI.h"
#include "KinTools.cpp"

and linkdef.h looks like

#pragma link C++ class TDalitzGui;
#pragma link C++ class AniGifDialog;

Both classes are defined in DalitzGui.h/cpp. Compiling/build against ROOT6 gives me a myriad of errors like

DalitzGUI.cpp:(.text+0x19): undefined reference to `TArrayD::TArrayD()'
DalitzGUI.cpp:(.text+0x29): undefined reference to `TArrayD::TArrayD()'
DalitzGUI.cpp:(.text+0x57): undefined reference to `TArrayD::~TArrayD()'
DalitzGUI.cpp:(.text+0x6c): undefined reference to `TArrayD::~TArrayD()'
/tmp/ccdNp4cH.o: In function `CRes::CRes(double, double, double, double, double, double, int)':
DalitzGUI.cpp:(.text+0xbc): undefined reference to `TArrayD::TArrayD()'
...
DalitzGUI.cpp:(.text+0x13d0): undefined reference to `TColor::CreateGradientColorTable(unsigned int, double*, double*, double*, double*, unsigned int, float)'
DalitzGUI.cpp:(.text+0x1581): undefined reference to `TColor::CreateGradientColorTable(unsigned int, double*, double*, double*, double*, unsigned int, float)'
DalitzGUI.cpp:(.text+0x16f3): undefined reference to `TColor::CreateGradientColorTable(unsigned int, double*, double*, double*, double*, unsigned int, float)'
DalitzGUI.cpp:(.text+0x1755): undefined reference to `gStyle'

Does somebody know a simple fix to this problem?

Thanks,
Klaus


Please read tips for efficient and successful posting and posting code

ROOT Version: 6.22/06
Platform: Not Provided
Compiler: Not Provided


Try:

`root-config --cxx --cflags` -o DalitzGUI DalitzGUI.cpp gui_linkdef.cpp `root-config --glibs`

Thanks, works perfectly fine!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.