LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-11-2009, 04:00 PM   #1
firsten
Member
 
Registered: Mar 2007
Posts: 36

Rep: Reputation: 15
Exclamation Symbol lookup error -> help please


Im programming with libxml++ library which is a C++ wrapper for libxml2 C library. My program compile ok and generates the executable, only when i run it, i get the following error:

/usr/local/pdc/pdc: symbol lookup error: /usr/local/pdc/pdc: undefined symbol: _ZN5xmlpp15SchemaValidatorC1Ev


then i did "ldd -r ./pdc" and resulted
[root@Labplan-39 pdc]# ldd -r pdc
linux-gate.so.1 => (0xb7f01000)
libxml++-2.6.so.2 => /usr/lib/libxml++-2.6.so.2 (0xb7ed6000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x41f5f000)
libglibmm-2.4.so.1 => /usr/lib/libglibmm-2.4.so.1 (0xb7e84000)
libgobject-2.0.so.0 => /lib/libgobject-2.0.so.0 (0x419d7000)
libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x418db000)
libpthread.so.0 => /lib/libpthread.so.0 (0x41841000)
liblxrt.so.1 => /usr/lib/liblxrt.so.1 (0xb7e75000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x41a5f000)
libm.so.6 => /lib/libm.so.6 (0x41816000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x41899000)
libc.so.6 => /lib/libc.so.6 (0x416b4000)
libsigc-2.0.so.0 => /usr/lib/libsigc-2.0.so.0 (0xb7e6f000)
libdl.so.2 => /lib/libdl.so.2 (0x4180f000)
libz.so.1 => /lib/libz.so.1 (0x4185c000)
libgmodule-2.0.so.0 => /lib/libgmodule-2.0.so.0 (0x41dcf000)
/lib/ld-linux.so.2 (0x41695000)
undefined symbol: _ZN5xmlpp15SchemaValidatorC1Ev (./pdc)

im not sure what to do now... never got this kind of error in runtime. Does anyone knows anything about this particular symbol or some documentation about symbols, so i can try to solve this? Thanks in advance!
 
Old 05-12-2009, 04:48 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Hi

You seem to have a library mismatch. I. e. one of the library headers you include in your program, defines a symbol that you reference in your program, BUT, when ran against the library referred to be the specific header, the symbol does not exist.

This usually happens only with dynamic (.so) libraries - i. e. some .so library you refer to has changed versions or is an incorrect version for the headers / symbol defs you are using to work with that library.

This sometimes happens with an auto-update of the library maybe changing the library .so itself, but not updating the headers associated with that library (and that are used by you).
 
Old 05-12-2009, 08:43 AM   #3
firsten
Member
 
Registered: Mar 2007
Posts: 36

Original Poster
Rep: Reputation: 15
How can i see if .so libraries and the headers are from the same version?
 
Old 05-12-2009, 10:00 AM   #4
firsten
Member
 
Registered: Mar 2007
Posts: 36

Original Poster
Rep: Reputation: 15
nevermind, i figured out. I had an old library installed, which was holding the .so libraries that needed to be updated. Once i did, the symbols resolved and everything works fine now! Thank you very much for your help
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
symbol lookup error: /usr/lib/libavcodec.so.51: undefined symbol: av_crc04C11DB7 priceey Linux - Software 0 05-06-2009 08:14 AM
./firefox-bin :symbol lookup error:/lib/libgthread-2.0.so.0: undefined symbol: arulupsaras Linux - General 1 11-08-2008 04:48 AM
symbol lookup error: /usr/lib/libgtk-x11.2.0.so.0: undefined symbol:... IamI Slackware 17 02-29-2008 11:10 AM
Workaround: 'symbol lookup error: k3b: undefined symbol: lstat64' devdol Linux - Software 2 02-15-2008 03:36 AM
./firefox-bin: symbol lookup error: /usr/lib/libpango-1.0.so.0: undefined symbol: g_s cb8100 Slackware 3 10-05-2006 10:55 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration