Hello!
I get a compiler error that seems to stem from initializing a TTreeReader object and I don’t know how to handle it:
$ rootCPP first_try2
/usr/bin/ld: first_try2.o: undefined reference to symbol '_ZN11TTreeReaderD1Ev'
/usr/local/lib/libTreePlayer.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
rootCPP is an alias I defined in my .bashrc:
function rootCPP {
g++ -std=gnu++11 -o $1.o $1.cc -c `root-config --cflags`
g++ -std=gnu++11 -o $1.exe $1.o `root-config --libs`;
}
My google research suggested, that some libs are not linked correctly, but I couldn’t find anything specific and I’m not yet proficient enough with linux to understand the problem
So far I never had any issues like this, are there any compatibility issues with TTreeReader?
I use a Fedora 23 OS and gcc version 5.3.1.
$gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC)