[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Buliding a shared library and need to specify an existing library, how?

From: Jim
Subject: Buliding a shared library and need to specify an existing library, how?
Date: Wed, 28 Jun 2006 15:50:53 -0400
User-agent: Thunderbird (X11/20060516)

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.


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/ -lmysqlpp -lboost_regex /usr/lib/ -lpthread -lssl -lccgnu2 /usr/lib/ -lccext2 -ldl /usr/lib/ /usr/local/lib/ undefined reference to `sqlite3_decode_binary(unsigned char const*, unsigned char*)'

Here's the imageserver/ 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


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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]