Dlopen Error Undefined Symbol Root
Contents |
reply to: dandwyer@socrates.Berkeley.EDU: "[ROOT] dlopen error: undefined reference" Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi Dan, If failed to load library undefined symbol you create your own executable module, you should provide the list of error link requested for unknown class ROOT libs required for the operation. To see the list of necessary libs, type root-config --glibs or better,
Dlopen Undefined Symbol C++
use directly root-config as follows: g++ -Wall K2RTree.C GetAvPedestal.cc -o get_av_ped -I/usr/local/cern/root_v3.01.06/include -I. `root-config --glibs` or `root-config --cflags --glibs` to specify the list of compile and link options in a
Dlopen Undefined Reference
machine independent way. Using the root-config utility has the advantage that if we had one more lib, you do not have to change your procedure. Rene Brun On Sun, 3 Mar 2002 dandwyer@socrates.Berkeley.EDU wrote: > > Hi, > > I'm trying to turn a working root macro into a compiled executable. > It compliles fine, but I am receiving some 'undefined undefined symbol dlopen symbol' errors > when dynamically linking libTreePlayer.so during execution. Here is > the error output: > > ------------------ > > $ ./get_av_ped ../chopped/crate5.root outfile2.root > dlopen error: /usr/local/cern/root/lib/libTreePlayer.so: undefined symbol: Copy__8TFormulaR7TObject > Load Error: Failed to load Dynamic link library /usr/local/cern/root/lib/libTreePlayer.so > Error in
time Discuss installing and running ROOT here. Please post bug reports in Jira. Moderator: rootdev Post Reply Search Advanced search First unread post • 13 posts • Page 1 of 1
Shared Library Undefined Symbol
zweng Posts: 11 Joined: Fri Jul 24, 2009 14:51 Problem of loading libary undefined symbol while loading shared library in the run time Quote Unread postby zweng » Tue Aug 18, 2009 15:55 hi all, i am quite new at dlsym undefined symbol root. i have a question about loading library in a main() function, rather than compile with the library , Is this possible? for example, if I run a root macro inside the root https://root.cern.ch/root/roottalk/roottalk02/0942.html program, i can use gSystem->Load("libRio"); gSystem->Load("libGeom"); in the root macro. but if i want to build a stand alone program, how can i load this library, when i try to do the same thing, i have such error message: dlopen error: /home/zweng/root/lib/libRIO.so: undefined symbol: _ZTV11TCollection Load Error: Failed to load Dynamic link library /home/zweng/root/lib/libRIO.so dlopen error: /home/zweng/root/lib/libGeom.so: undefined symbol: _ZTI7TString Load Error: Failed to load Dynamic link https://root.cern.ch/phpBB3/viewtopic.php?t=9019 library /home/zweng/root/lib/libGeom.so How can i deal with this problem? Thanks ! Top pcanal Posts: 6977 Joined: Wed Aug 27, 2003 15:22 Location: Fermilab Quote Unread postby pcanal » Tue Aug 18, 2009 16:49 Hi, In those cases, you also need to link or load libCore.so Cheers, Philippe. Top zweng Posts: 11 Joined: Fri Jul 24, 2009 14:51 Quote Unread postby zweng » Tue Aug 18, 2009 17:09 pcanal wrote:Hi,In those cases, you also need to link or load libCore.soCheers,Philippe. Thank you for your reply. Actually i had already load the libCore.so and also libCint.so, but the error message still goes: dlopen error: /home/zweng/root/lib/libRIO.so: undefined symbol: _ZTV11TCollection Load Error: Failed to load Dynamic link library /home/zweng/root/lib/libRIO.so dlopen error: /home/zweng/root/lib/libGeom.so: undefined symbol: _ZTI7TString Load Error: Failed to load Dynamic link library /home/zweng/root/lib/libGeom.so dlopen error: /home/zweng/root/lib/libMatrix.so: undefined symbol: gROOT Load Error: Failed to load Dynamic link library /home/zweng/root/lib/libMatrix.so Error in
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn http://stackoverflow.com/questions/14623873/accessing-so-libraries-using-dlopen-throws-undefined-symbol-error more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Accessing .so libraries using dlopen() throws undefined symbol error undefined symbol up vote 3 down vote favorite 3 I'm trying to dynamically load a camera library .so file into a Linux executable to gain access to simple camera functions. I'm attempting to do this by: if ( (newHandle = dlopen("./libCamera.so",RTLD_LAZY | RTLD_GLOBAL)) == NULL ) { printf( "Could not open file : %s\n", dlerror() ); return 1; } However this fails and I receive the following output: "Could not library undefined symbol open file : libCamera.so: undefined symbol: ZTVN10_cxxabiv117__class_type_infoE" How do I find out what symbols it is relying on? linux shared-libraries share|improve this question asked Jan 31 '13 at 10:45 Joey Big 18114 add a comment| 4 Answers 4 active oldest votes up vote 7 down vote accepted Most likely, libCamera.so uses a symbol defined in a shared library without depending on that library. Find a culprit. Take a real executable which links against libCamera.so (and it works). List its dependencies with ldd /path/to/executable. Among them should be a library which has a definition for ZTVN10_cxxabiv117__class_type_infoE (use grep to select likely candidates, nm -D on a library to be sure). That library won't be in the list shown by ldd ./libCamera.so. Solve a problem. Load the library found in step 1 by dlopen first (use RTLD_GLOBAL there as well). If there is a problem with another symbol, goto step 1. If newly-added libraries have the same problem too, goto step 1. Tell library authors to please fix their linking. It could also happen that one of the prerequisites in ldd ./libCamera.so got upgraded and lost a symbol definition (maybe it was recompiled with a compiler which does name mangling differently). Then you w