I have a short script that reads a tree from a root file and generates a canvas showing a signal. The script works fine. However, I needed to add a library file called ‘libTParameters.so’ from another directory in my Makefile. After adding the file, I got an error message as follows:
/usr/bin/ld: /projects/scode/libTParameters.so: undefined reference to `TPID::Reset()’
TPID is a class and the header file where it is declared is in the /projects/scode/include directory.
My current working directory is separate from either of these. Therefore I have explicitly included the TPID.h file in my script.
What I understood so far that the library that I have added was not linked properly. Can you please help me figuring out what I am missing? I am attaching the code and the Makefile herein .