One of the classes in the shared library requires/references a system
library. I included the system library in the library list of the
program that is using the shared library but I guess because the objects
in the program don't require it, the loader is ignoring it and complains
that it can't find "....".
So is there a way, other than putting a dummy reference into the
program, to force the loader to look at the system library?
I tried reordering the references, but if that's the solution, I didn't
get it right.
Thanks,
Jim.
Here's the error:
g++ -g -O2 -o vaprobe arc.o probethread.o protocamera.o protosimple.o
vaprobe.o -L/usr/lib/mysql -limageserver-0.1 /usr/lib/libsqlite3.so
-lmysqlpp -lboost_regex /usr/lib/libmysqlclient.so -lpthread -lssl
-lccgnu2 /usr/lib/libcurl.so -lccext2 -ldl /usr/lib/libxml2.so
/usr/local/lib/libimageserver-0.1.so: undefined reference to
`sqlite3_decode_binary(unsigned char const*, unsigned char*)'
Here's the imageserver/Makefile.am file
INCLUDES = -I/usr/include/cc++2 -I/usr/local/include
-I/usr/include/mysql -I/usr/local/include/imageserver-0.0
DEPS_CLAGS = -I/usr/include/cc++2 -I/usr/local/include -I/usr/include/mysql
DEPS_LIBS= -L/usr/lib/mysql -lsqlite3 -limageserver-0.1 -lsqlite3
-lmysqlpp -lboost_regex -lmysqlclient -lpthread -lssl -lccgnu2 -lcurl
-lccext2 -ldl -lxml2
bin_PROGRAMS=vaprobe
vaprobe_SOURCES=...
Note, I tried to put it in before and after but libtool reoders it.
Is there somthing I can do when I generate the shared library that might
get saved so the loader knows I need the sqlite3 library? This worked
fine when the class referencing the sqlite3 library was part of the
vaprobe program.