I’m migrating from windows over to linux and I’m having trouble making dynamic libraries (along with many other things…).
I am trying:
g++ -c -fPIC -Wno-long-long -I/usr/include/root ./Vehicle/LVehicle.cpp
followed by:
ld -shared -soname libVehicle.so.1 -o libVehicle.so.1.0 -lc LVehicle.o
I then move this into the proper directory and link it to libVehicle.so by:
ln -sf libVehicle.so.1.0 libVehicle.so
When I try to load the library in root I get the following:
root [0] gSystem->Load(“libVehicle”)
dlopen error: /home/clkunz/root_work/src_dev/dlls/./libVehicle.so: undefined sym
bol: _ZN8LVehicle11ShowMembersER16TMemberInspectorPc
Load Error: Failed to load Dynamic link library /home/clkunz/root_work/src_dev/d
lls/./libVehicle.so
(int)(-1)
*** Interpreter error recovered ***
root [1] .q
I think I’m missing something simple. Help!
Thanks,
Chris