Hello Root Users!
I have created a class, which looks like
class LUT
{
public:
ROOT::Math::Interpolator interpolEdep;
LUT();
...
}
LUT::LUT() //default constructor
{
interpolEdep=ROOT::Math::Interpolator(0,ROOT::Math::Interpolation::kCSPLINE);
...
}
When compiling / executing from within root (using aclic) .x myfile.cxx+ it works without problems.
However, compiling outside of root, using g++ `root-config --cflags --glibs` -o outputfile myfile.cxx
I get the following errors - see attached file.
Any help would be greatly appreciated.
Yours,
Hermann
-- ------------- DI Hermann Fuchs Div. Medical Radiation Physics Department of Radiotherapy Med. Univ. Vienna / AKH Vienna Währinger Gürtel 18-20 A-1090 Wien Tel. + 43 / 1 / 40 400 7271 Mail. hermann.fuchs_at_meduniwien.ac.atReceived on Thu Aug 11 2011 - 14:36:22 CEST
/tmp/ccTOV1Pg.o: In function `LUT::LUT()':
ipolTest.cxx:(.text+0x451): undefined reference to `ROOT::Math::Interpolator::Interpolator(unsigned int, ROOT::Math::Interpolation::Type)' ipolTest.cxx:(.text+0x467): undefined reference to `ROOT::Math::Interpolator::Interpolator(unsigned int, ROOT::Math::Interpolation::Type)' ipolTest.cxx:(.text+0x481): undefined reference to `ROOT::Math::Interpolator::operator=(ROOT::Math::Interpolator const&)' ipolTest.cxx:(.text+0x48d): undefined reference to `ROOT::Math::Interpolator::~Interpolator()' ipolTest.cxx:(.text+0x56a): undefined reference to `ROOT::Math::Interpolator::~Interpolator()' ipolTest.cxx:(.text+0x581): undefined reference to `ROOT::Math::Interpolator::~Interpolator()'
/tmp/ccTOV1Pg.o: In function `LUT::LUT(double, double, int)':
ipolTest.cxx:(.text+0x5c2): undefined reference to `ROOT::Math::Interpolator::Interpolator(unsigned int, ROOT::Math::Interpolation::Type)' ipolTest.cxx:(.text+0x5d8): undefined reference to `ROOT::Math::Interpolator::Interpolator(unsigned int, ROOT::Math::Interpolation::Type)' ipolTest.cxx:(.text+0x5f2): undefined reference to `ROOT::Math::Interpolator::operator=(ROOT::Math::Interpolator const&)' ipolTest.cxx:(.text+0x5fe): undefined reference to `ROOT::Math::Interpolator::~Interpolator()' ipolTest.cxx:(.text+0x6d5): undefined reference to `ROOT::Math::Interpolator::~Interpolator()' ipolTest.cxx:(.text+0x6ec): undefined reference to `ROOT::Math::Interpolator::~Interpolator()'
/tmp/ccTOV1Pg.o: In function `LUT::~LUT()':
ipolTest.cxx:(.text+0x750): undefined reference to `ROOT::Math::Interpolator::~Interpolator()'
/tmp/ccTOV1Pg.o: In function `LUT::setInterpolEdepData()':
ipolTest.cxx:(.text+0x999): undefined reference to `ROOT::Math::Interpolator::SetData(unsigned int, double const*, double const*)'
/tmp/ccTOV1Pg.o: In function `LUT::getEdep(double)':
ipolTest.cxx:(.text+0xa20): undefined reference to `ROOT::Math::Interpolator::Eval(double) const'
/tmp/ccTOV1Pg.o: In function `LUT::interpolateEnergy(double**, double)':
ipolTest.cxx:(.text+0x12e7): undefined reference to `ROOT::Math::Interpolator::Interpolator(unsigned int, ROOT::Math::Interpolation::Type)' ipolTest.cxx:(.text+0x1542): undefined reference to `ROOT::Math::Interpolator::SetData(unsigned int, double const*, double const*)' ipolTest.cxx:(.text+0x15ac): undefined reference to `ROOT::Math::Interpolator::Eval(double) const' ipolTest.cxx:(.text+0x166a): undefined reference to `ROOT::Math::Interpolator::~Interpolator()' ipolTest.cxx:(.text+0x168d): undefined reference to `ROOT::Math::Interpolator::~Interpolator()'
/tmp/ccTOV1Pg.o: In function `LUT::interpolateArray(double**, int, double**)':
ipolTest.cxx:(.text+0x16d6): undefined reference to `ROOT::Math::Interpolator::Interpolator(unsigned int, ROOT::Math::Interpolation::Type)' ipolTest.cxx:(.text+0x16f7): undefined reference to `ROOT::Math::Interpolator::SetData(unsigned int, double const*, double const*)' ipolTest.cxx:(.text+0x1768): undefined reference to `ROOT::Math::Interpolator::Eval(double) const' ipolTest.cxx:(.text+0x1799): undefined reference to `ROOT::Math::Interpolator::~Interpolator()' ipolTest.cxx:(.text+0x17af): undefined reference to `ROOT::Math::Interpolator::~Interpolator()' collect2: ld returned 1 exit status
This archive was generated by hypermail 2.2.0 : Thu Aug 11 2011 - 17:50:02 CEST