Linker problem I think

This is a discussion on Linker problem I think within the C++ Programming forums, part of the General Programming Boards category; I'm compiling some code and it has a bunch of "undefined reference" due to the error: warning: libxerces-c.so.23, needed by ...

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    184

    Linker problem I think

    I'm compiling some code and it has a bunch of "undefined reference" due to the error:

    warning: libxerces-c.so.23, needed by build/i386-linux/debug/lib/libVXID.so, not found (try using -rpath or -rpath-link)

    What's weird is I've included that library via:

    -L"/home/MyName/development/VXML/ext//lib"

    This shows up in the verbose printout of the command, and that folder does indeed hold the file "libxerces-c.so.23". So what can be wrong?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Really? How do you even get //lib as part of a path?

  3. #3
    Registered User
    Join Date
    Nov 2006
    Posts
    184
    Quote Originally Posted by tabstop View Post
    Really? How do you even get //lib as part of a path?
    It's constructed by an environment variable. But when I change that, it still gives the error.

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Hmmmmmmmm. -rpath is an ld option, not a gcc option, so is there a separate ld command being run? Perhaps gcc isn't passing the option off somehow? Maybe add -Xlinker -rpath -Xlinker directory/path to make sure.

  5. #5
    Registered User
    Join Date
    Nov 2006
    Posts
    184
    Quote Originally Posted by tabstop View Post
    Hmmmmmmmm. -rpath is an ld option, not a gcc option, so is there a separate ld command being run? Perhaps gcc isn't passing the option off somehow? Maybe add -Xlinker -rpath -Xlinker directory/path to make sure.
    I did that and now it says:

    warning: libstdc++.so.5, needed by /home/MyName/development/VXML/ext/lib/libxerces-c.so.23, not found (try using -rpath or -rpath-link)

    How do I resolve that? I know "libstdc++.so.6" exists but I'm pretty sure "libstdc++.so.5" does not.
    Last edited by 6tr6tr; 10-22-2008 at 08:19 PM.

  6. #6
    Registered User
    Join Date
    Nov 2006
    Posts
    184
    Quote Originally Posted by 6tr6tr View Post
    I did that and now it says:

    warning: libstdc++.so.5, needed by /home/MyName/development/VXML/ext/lib/libxerces-c.so.23, not found (try using -rpath or -rpath-link)

    How do I resolve that? I know "libstdc++.so.6" exists but I'm pretty sure "libstdc++.so.5" does not.
    I was able to solve this by also installing the older c++ libs (libstdc++5 files). This allowed it to compile but now it says there may be a conflict with 6! Any idea what the risks are?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mysterious Linker Error
    By Night_Blade in forum Windows Programming
    Replies: 0
    Last Post: 04-30-2006, 01:50 PM
  2. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 05:24 PM
  3. vc++ linker options problem
    By fnoyan in forum C++ Programming
    Replies: 2
    Last Post: 12-08-2005, 10:22 AM
  4. Replies: 5
    Last Post: 11-07-2005, 10:34 PM
  5. half ADT (nested struct) problem...
    By CyC|OpS in forum C Programming
    Replies: 1
    Last Post: 10-26-2002, 08:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21