Relocation error problem

Hallo,

I am trying to use the TVector3 class in my shared library. Everything is OK when I run the compiled binary but if I’m trying to use this library in CINT I get the following message:

[quote]/usr/local/root/bin/root.exe: relocation error: /home/users/batkov/prog/test_vector3/./libA.so: undefined symbol: _ZN8TVector3C1Eddd
[/quote]
You can find a short example in the attachment. Uncompress the tarball in a separate directory and type make in order to build the library. Run test_vector3 to see that it works if compiled. My question is: why these lines in CINT produce the error message:

root [0] gSystem->Load("libA")
(int)0
root [1] A a
... relocation error

I guess that the problem is not concerned with TVector3 class, but maybe with the way how I compile/load the library. I was not able to find the answer neither in this forum nor in the documentation.

My ROOT version is 5.17/01
test_vector3.tar.gz (1.02 KB)

I cannot reproduce your problem when doing

.L A.cxx+ A a
Could you show how you create your libA file?

Rene

This is shown in the Makefile attached.

[quote]undefined symbol: _ZN8TVector3C1Eddd[/quote]need lib with TVector3 class …gSystem->Load("libPhysics.so")Jan

[quote]gSystem->Load(“libPhysics.so”)[/quote]Thanks, this helps.