MySQL Forums
Forum List  »  Connector/C++

Problems loading a lib, using mysql
Posted by: J Andersen
Date: April 24, 2009 07:30AM

On linux: I am creating a STAF service, which is basically a shared library that is loaded manually (with dlopen or similar). The library compiles and links with no errors, but won't load:

# STAFProc
Caught STAFException
Name : STAFException
Location : /opt/dev/autobuild/build/src/staf/stafif/STAFDynamicLibraryInlImpl.cpp(29)
Text : STAFDynamicLibraryOpen: /usr/local/staf/lib/libinfares.so: undefined symbol: _ZN3sql5mysql25get_mysql_driver_instanceEv
Error code: 10
Error reading config file

However, ldd says:

# ldd /usr/local/staf/lib/libinfares.so
libpthread.so.0 => /lib/libpthread.so.0 (0x00002b2fcad12000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00002b2fcae28000)
libdl.so.2 => /lib/libdl.so.2 (0x00002b2fcaf5c000)
libSTAF.so => not found
libmysqlclient_r.so.15 => /usr/lib/libmysqlclient_r.so.15 (0x00002b2fcb060000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00002b2fcb362000)
libm.so.6 => /lib/libm.so.6 (0x00002b2fcb560000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00002b2fcb6e3000)
libc.so.6 => /lib/libc.so.6 (0x00002b2fcb7f0000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00002b2fcba2d000)
libz.so.1 => /usr/lib/libz.so.1 (0x00002b2fcbb45000)

So it clearly finds libmysqlclient_r.so. What is wrong here? Is it the wrong library I link against?

Options: ReplyQuote


Subject
Views
Written By
Posted
Problems loading a lib, using mysql
3949
April 24, 2009 07:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.