Home | News | Documentation | Download

TGLVector3 using

I’m trying to use TGLVector3, which prompts me with the following information. I don’t know how to solve it

IncrementalExecutor::executeFunction: symbol '_ZN10TGLVector3C1Eddd' unresolved while linking [cling interface function]!
You are probably missing the definition of TGLVector3::TGLVector3(double, double, double)
Maybe you need to load the corresponding shared library?

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Can you post some code reproducing this problem ?

Hi,I am studying a program and found that it can’t run. During the test, I found that there was a problem with TGLVector3 at the beginning. The following is the part of the test

void Projection(double TarX,double TarY,double PreSiX, double PreSiY, double X,double Y,double *Var){
 TGLVector3* PtarPpre=new TGLVector3(PreSiX-TarX,PreSiY-TarY,SiZ-TarZ); 
TGLVector3* PtarPsi=new TGLVector3(X-TarX,Y-TarY,SiZ-TarZ);
 TGLVector3* PtarP0=new TGLVector3(0,0,SiZ-TarZ); } double Var[4]; 
Projection( 3,2,1,0,32,32,Var); 
cout<<Var[0]<<endl;

Then,I try TGLVector3 on the command line of ROOT, and the following prompt will appear

root [0] TGLVector3(1,2,3) IncrementalExecutor::executeFunction: symbol '_ZN10TGLVector3C1Eddd' unresolved while linking [cling interface function]! You are probably missing the definition of TGLVector3::TGLVector3(double, double, double) Maybe you need to load the corresponding shared library? 
root [1]

I use ROOT 6.22/02

It is ok on MacOS:

root [0] TGLVector3 *v = new TGLVector3(1,2,3)
(TGLVector3 *) 0x7ff39740b980
root [1] 

No,I tried this, but it couldn’t

root [0] TGLVector3 *v = new TGLVector3(1,2,3)
IncrementalExecutor::executeFunction: symbol '_ZN10TGLVector3C1Eddd' unresolved while linking function '_GLOBAL__sub_I_cling_module_47'!
You are probably missing the definition of TGLVector3::TGLVector3(double, double, double)
Maybe you need to load the corresponding shared library?
(TGLVector3 *) nullptr
root [1] 

I use the CentOS system. Root is installed according to the method provided by the official website. Is there something missing?

It might be your ROOT installation is corrupted somehow. I did an installation from sources as described here in the Building section.

I tried this solution and reinstalled root, but there were still errors

root [0] TGLVector3(1,2,3)
input_line_12:2:3: error: use of undeclared identifier 'TGLVector3'
 (TGLVector3(1, 2, 3))
  ^
Error in <HandleInterpreterException>: Error evaluating expression (TGLVector3(1, 2, 3)).
Execution of your code was aborted.
root [1] 

Are you sure you are running the new ROOT you just installed ? have you “sourced” the thisroot.sh script ? did the installation went smoothly without errors ?

I sure I are running the new ROOT I just installed .And I “sourced” the thisroot.sh script.I didn’t look “errors” when I installed it.
I installed the root on centos8. Just now I also re installed the root on centos7 according to this method. I found that tglvector3 can be used. Is this method not applicable to centos8?

Ok. It looks like something related with Cling as this class is not found (on centos8 only). At least the reproducer is simple. May be @Axel has some ideas about this
issue.

We need more information - the info we ask for when you create a new post and which you didn’t provide yet. Please provide it now:

And please tell us how you installed ROOT: dnf, conda, built from source,…

ROOT Version: 6.22/06
Platform: centos8
Compiler: cmake 3.11.4

built from source

OK thanks. Do you have $ROOTSYS/lib/libRGL.so?

No,I don’t find it