TPostScript: symbol undefined


I have a strange problem. I have just downloaded the 4,00.08 root as a binary
installation and trying to make it run. I have set ROOTSYS, LD_LIBRARY_PATH
and PATH set correctly (the system is SL 3.x). I can start root and run a simple
example. However, there is a problem with any program that uses TPostScript.
I can execute them interactively, but if I try to precompile them, I get
undefined reference to `TPostScript::TPostScript(char const*, int)’

Why would that be? This error is gone even if I simply load the that
came with the binary installation, and then try to precompile the code.

Here is a simple example:

the root program that I call testroot.C

#include “TPostScript.h”

void testroot(){
TPostScript *a=new TPostScript(“”,1);

The command that returns the error:

root testroot.C++

The same command/example runs fine on the machines with officially installed
CDF or CMS software. It is just my private binnary install refuses to work.
Any help is appreciated.

  • Yungren

It could be that you have a wrong $ROOTSYS/etc/system.rootrc where the Postscript plugin is defined.


Hi Rene,

I was wondering about that, but I am using the tarball with ROOT downloaded

from the without any modifications, the system.rootrc came with it.
I do not know how to read it to say if it is wrong or right. It has a line that mentions

Ilya is not linked with the default root.exe executable.
(it was linked with older versions)
if you do

root testroot.C ROOT will be able to dynamically libPostScript. It knows that TPostScipt is
in libPostScript via $ROOTSYS/etc/system.rootmap
However if you use ACLIC
root testroot.C+
the file testroot is compiled by the normal compiler. The compiler
expects the class TPostScipt to be already linked. To work, instead do

root root > gSystem->Load("libPostScript"); root > .x testroot.C+

Hi Rene,

What you say works, I was doing that alerady. What I am trying to find out is
whether there is a simple way to configure root so I do not need to load the
library. For example, the root that comes with CDF software at fermilab and,
I think, cms software as well does not require that I load the postscrtipt
shared library, I run there “root testroot.C++” without any extra steps.
Do you know where else it can be configured so that it is pre-loaded?
For now I have put the load into my rootlogon.C, but at CDF I do not
have to do even that.