I am trying to create a library that wraps libpurple (you don't need to know anything about libpurple to help here). Libpurple, in turn, downloads "plugins" that are simply accessible through something like dlopen. These plugins, in turn, return to the libpurple functions.
I can build my library just fine, but when it calls the corresponding init function libpurple and libpurple tries to load the plugin, I get an error, for example:
character search error: /usr/local/lib/purple-2/autoaccept.so: undefined character: purple_user_dir
purple_user_dir is a function defined in libpurple. When I create a program (not a library) that references libpurple, there is no problem. I tried using -export-dynamic, and that didn't seem to help. Here is my build command:
gcc -export-dynamic -I/usr/local/include/libpurple -I/usr/include/python2.5 -DH\ AVE_CONFIG_H -I. -DSTANDALONE -DBR_PTHREADS=0 -DDATADIR=\"/usr/local/share\" -D\ LIBDIR=\"/usr/local/lib/purple-2/\" -DLOCALEDIR=\"/usr/local/share/locale\" -DS\ YSCONFDIR=\"/usr/local/etc\" -Wall -Waggregate-return -Wcast-align -Wdeclarati\ on-after-statement -Wendif-labels -Werror-implicit-function-declaration -Wextra\ -Wno-sign-compare -Wno-unused-parameter -Winit-self -Wmissing-declarations -Wm\ issing-noreturn -Wmissing-prototypes -Wpointer-arith -Wundef -Wp,-D_FORTIFY_SOU\ RCE=2 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/inc\ lude/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/gl\ ib-2.0/include -I/usr/include/libxml2 -g -g -O2 -c -o spurple.o spurple.c gcc -shared -g -O2 -Wl,
Thanks.
r83
source share