Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    run time error undefined symbol in the shared object


    Right now I am porting an application from solaris to Red hat linux.

    I have faced a run time problem while running my application.

    The error says that " undefined symbol in the shared object"

    We are using dlopen() to open a library.

    One of the arguments used inside that dlopen() in the place of flag "RTLD_LAZY" for solaris.

    Should I change the argument to RTLD_NOW or RTLD_GLOBAL in Linux ?

    I am unable to find the exact meaning of that error.

    Any suggestions would help me a lot.

  2. #2
    Is the shared library your code or is it part of the distribution?

    Shared libraries DO NOT have the same entry points defined always across distibutions
    In other words, your code is trying to find a symbol, call it myxxx.
    That error says the symbol myxxx is not in shared library where it was expected to be found.

    Linux often has different version numbers in the names for the various versions of the same library, eg, -- with a single link in the
    /usr/lib directory (in this example libc.1) to point to the most current file.

    You need to re-link specfying the EXACT name of the library not something like "-lpthread" That way, dlopen will try the right version of the library.

    Your problem is not in the dlopen call, it is in what dlopen is looking at.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts