Linking problems when linking against ROOT libraries

Hello,
I made my a program which I am trying to link against ROOT (installed from binaries) libraries.
I should say that I didn’t have this problem when using a compiled version of root.
My system is:
Intel, RedHat 9 (Shrike)

Root Version is:
4.03/02

The Compile&linking command and the Error are:
g++ -g -fPIC -Wall -o RootClean RootClean.C -pthread -I/afs/ipp/mpe/gamma/instruments/integral/isdc/osa/osa-5.0/linux_sw-5.0/root//include -Wno-long-long -Wall -I/afs/ipp-garching.mpg.de/mpe/gamma/instruments/swift/software/headas_2.2_olga/i686-pc-linux-gnu-libc2.3.2/include -I/afs/ipp/mpe/gamma/instruments/integral/isdc/osa/osa-5.0/linux_sw-5.0/root//geom/inc -I/afs/ipp-garching.mpg.de/mpe/gamma/instruments/swift/software/headas_2.2_olga/i686-pc-linux-gnu-libc2.3.2/include -I/afs/ipp/mpe/gamma/instruments/integral/isdc/osa/osa-5.0/linux_sw-5.0/root//include -L/afs/ipp/mpe/gamma/instruments/integral/isdc/osa/osa-5.0/linux_sw-5.0/root//lib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lGui -pthread -lm -ldl -rdynamic -lHtml -lGeom -L/afs/ipp-garching.mpg.de/mpe/gamma/instruments/swift/software/headas_2.2_olga/i686-pc-linux-gnu-libc2.3.2/lib -lcfitsio_3.003 -Wno-long-long
RootClean.C: In function int SimpleFit(float*, int*, TH2F*, int&, double*, int)': RootClean.C:522: warning: unused variableint nofbasicpar’
/afs/ipp/mpe/gamma/instruments/integral/isdc/osa/osa-5.0/linux_sw-5.0/root//lib/libCint.so: undefined reference to std::basic_istream<char, std::char_traints<char> >::seekg(std::fpos<mbstate_t>)' /afs/ipp/mpe/gamma/instruments/integral/isdc/osa/osa-5.0/linux_sw-5.0/root//lib/libCint.so: undefined reference tostd::basic_ostream<char, std::char_traits >::seekp(std::fpos<mbstate_t>)'
collect2: ld returned 1 exit status

-Marco

This looks like an inconsistency between the compiler used to compile the ROOT binary tar file and your local compiler.
You should recompile ROOT from source.

Can you run the standard ROOT tutorials ?

Rene

Hi Rene,
yes I can run the tutorials and even compile the examples in the test direcory.
So I’d say Root is working normally.
It looks very strange. I would have already installed a compiled version if I had the permissions :slight_smile:.
So I was trying to use the compiled version.
-Marco