#1
  1. Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    26
    Rep Power
    0

    shared object not loading!!!!


    Hi !!! :)

    I compiled a c++ program using mysql API into a shared object(.so) and found this problem !!!!

    I am able to get the shared object in both linux 8.0 and linux 6.2 separately, but unable to load the file in linux6.2 and it says some variables not defined , if i eliminate that variable and re-compile, it points to another variable, ..

    The output of nm -u for the .so obtained after compiling in Linux6.2 is given below :

    ___brk_addr@@GLIBC_2.0
    __curbrk@@GLIBC_2.0
    __environ@@GLIBC_2.0
    __gmon_start__
    abort@@GLIBC_2.0
    atexit@@GLIBC_2.0
    changeable_vars
    close__9MYSQL_LOGb
    fn_ext
    free@@GLIBC_2.0
    malloc@@GLIBC_2.0
    memcpy@@GLIBC_2.0
    mysql_close
    mysql_connect
    mysql_error
    mysql_fetch_row
    mysql_free_result
    mysql_log
    mysql_query
    mysql_real_data_home
    mysql_slow_log
    mysql_store_result
    mysql_update_log
    open__9MYSQL_LOGPCc13enum_log_typeT1
    pthread_create
    pthread_getspecific
    pthread_key_create
    pthread_key_delete
    pthread_mutex_lock@@GLIBC_2.0
    pthread_mutex_trylock
    pthread_mutex_unlock@@GLIBC_2.0
    pthread_once
    pthread_setspecific
    remove@@GLIBC_2.0
    set_changeable_var
    set_changeable_varval
    sprintf@@GLIBC_2.0
    stpcpy@@GLIBC_2.0
    strcat@@GLIBC_2.0
    strcend
    strcmp@@GLIBC_2.0
    strcpy@@GLIBC_2.0
    strmake
    since i am new to this , i have no idea of whats wrong !!! i invite any suggestions from you.

    please help me!!!!:confused:
  2. #2
  3. I'm Baaaaaaack!
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jul 2003
    Location
    Maryland
    Posts
    5,538
    Rep Power
    244
    My guess is the library is not the same on both versions of the OS. Either recompile the libraries or try to find OS specific libs on the web.

    My blog, The Fount of Useless Information http://sol-biotech.com/wordpress/
    Free code: http://sol-biotech.com/code/.
    Secure Programming: http://sol-biotech.com/code/SecProgFAQ.html.
    Performance Programming: http://sol-biotech.com/code/PerformanceProgramming.html.
    LinkedIn Profile: http://www.linkedin.com/in/keithoxenrider

    It is not that old programmers are any smarter or code better, it is just that they have made the same stupid mistake so many times that it is second nature to fix it.
    --Me, I just made it up

    The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
    --George Bernard Shaw

IMN logo majestic logo threadwatch logo seochat tools logo